Skip to content

Commit

Permalink
bigfix: add Props folder after running npm i
Browse files Browse the repository at this point in the history
Also readme updated for the same
  • Loading branch information
jugshaurya committed Mar 26, 2021
1 parent 95b420c commit b267169
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 18 deletions.
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<a href="https://github.com/react-native-elements/react-native-elements">
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)


34 changes: 30 additions & 4 deletions injectLatestProps.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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
Expand All @@ -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}`);
};
}
);
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b267169

Please sign in to comment.