Skip to content

Commit

Permalink
Add to the .gitignore automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Reid committed Mar 6, 2018
1 parent c16cfb5 commit 3ea8034
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,6 @@ yo react-native:reducer MyReducer

The default `react-native init` now comes with tvOS targets... These add un-needed cruft to the project. Best plan is to open the XCode project, remove the tvOS targets and then delete the files in the project themselves.

Add the following to your `.gitignore`.

```
# Enviroments
.env
.env.development
.env.staging
.env.live
.env.production
```

Follow the Android version of these instructions to add automatic build numbers.

[https://medium.com/@andr3wjack/versioning-react-native-apps-407469707661#.quhgn05gf](https://medium.com/@andr3wjack/versioning-react-native-apps-407469707661#.quhgn05gf)
Expand Down
1 change: 1 addition & 0 deletions generators/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ module.exports = class extends Generator {

end() {
this.spawnCommandSync('yarn', ['run', 'prettier']);
this.spawnCommandSync('yarn', ['run', 'updateignore']);
this.log('Setup complete!');
this.log('Please refer to the post-install notes');
this.log('https://github.com/simpleweb/generator-react-native#after-react-nativebase');
Expand Down
5 changes: 5 additions & 0 deletions generators/base/templates/bin/gitignore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash -e

echo "" >> .gitignore;
echo "# Environments" >> .gitignore;
echo ".env*" >> .gitignore;
1 change: 1 addition & 0 deletions generators/base/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"scripts": {
"prettier": "prettier --config ./node_modules/@simpleweb/configs/.prettierrc --write './App/**/*.js'",
"updateignore": "./bin/gitignore.sh",
"version": "./bin/version-ios.sh",
"test": "jest --verbose",
"coverage": "jest --coverage",
Expand Down

0 comments on commit 3ea8034

Please sign in to comment.