diff --git a/README.md b/README.md index 8d14606..2ddc407 100644 --- a/README.md +++ b/README.md @@ -32,29 +32,33 @@ ![React Native Elements UI Toolkit](https://github.com/react-native-elements/playground/blob/master/public/thumbnail.png) - ### Installation - 1. Clone the repo + ```sh git clone https://github.com/react-native-elements/playground.git cd playground ``` -2. Install NPM packages + +2. Install NPM packages, add Playground Props, react-native-elements folder + ```sh npm i ``` + 3. Prepare (File path is UNIX based, might not work with Windows. PR Appreciated) + ```sh npm run prepare ``` + 4. Run the development server + ```sh npm start ``` - ## Releated Projects @@ -69,19 +73,14 @@ npm start ## Documentation -[View the full docs of React Native elements here](https://reactnativeelements.com/docs/overview) +[View the full docs of React Native elements here](https://reactnativeelements.com/docs/overview) ## Contributing - - - Interested in contributing to this repo? Check out our [Contributing Guide](https://reactnativeelements.com/docs/contributing) and submit a PR for a new feature/bug fix. - - ### First Contributors We encourage everyone to contribute & submit PR's especially first-time @@ -95,7 +94,6 @@ an or a [pull request](https://github.com/react-native-elements/playground/pulls). - ### Slack Community In case you have any other question or would like to come say **Hi!** to the RNE @@ -161,5 +159,3 @@ Do you use React Native Elements in production? If so, consider supporting this [![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/17/avatar)](https://opencollective.com/react-native-elements/sponsor/17/website) [![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/18/avatar)](https://opencollective.com/react-native-elements/sponsor/18/website) [![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/19/avatar)](https://opencollective.com/react-native-elements/sponsor/19/website) - - diff --git a/injectLatestProps.js b/injectLatestProps.js index 2137d2b..f4203b9 100644 --- a/injectLatestProps.js +++ b/injectLatestProps.js @@ -1,5 +1,28 @@ -const { exec } = require("child_process"); -exec( +const { execSync } = require("child_process"); + +execSync("rimraf ./react-native-elements/", (err, stdout, stderr) => { + if (err) { + // node couldn't execute the command + return; + } + + // the *entire* stdout and stderr (buffered) + console.log(`stdout: ${stdout}`); + console.log(`stderr: ${stderr}`); +}); + +execSync("rimraf ./src/content/Props", (err, stdout, stderr) => { + if (err) { + // node couldn't execute the command + return; + } + + // the *entire* stdout and stderr (buffered) + console.log(`stdout: ${stdout}`); + console.log(`stderr: ${stderr}`); +}); + +execSync( "git clone https://github.com/react-native-elements/react-native-elements --depth=1", (err, stdout, stderr) => { if (err) { @@ -12,7 +35,9 @@ exec( console.log(`stderr: ${stderr}`); } ); -exec("cp -r ./react-native-elements/website/docs/props ./src/content/Props"), + +execSync( + "cp -r ./react-native-elements/website/docs/props ./src/content/Props", (err, stdout, stderr) => { if (err) { // node couldn't execute the command @@ -22,4 +47,5 @@ exec("cp -r ./react-native-elements/website/docs/props ./src/content/Props"), // the *entire* stdout and stderr (buffered) console.log(`stdout: ${stdout}`); console.log(`stderr: ${stderr}`); - }; + } +); diff --git a/package.json b/package.json index 7553999..f99fb98 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "react-native-web-linear-gradient": "^1.1.1", "react-router-dom": "^5.2.0", "react-scripts": "3.4.1", - "react-view": "^2.3.2" + "react-view": "^2.3.2", + "rimraf": "^3.0.2" }, "scripts": { "start": "react-app-rewired start",