Skip to content

Commit

Permalink
Merge pull request #28 from emin93/new-cli-post-install
Browse files Browse the repository at this point in the history
Prepared automatic execution of the post install script
  • Loading branch information
emin93 authored Mar 5, 2019
2 parents ea456ca + ffc9af3 commit a332cb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Clean and minimalist React Native template for a quick start with TypeScript.",
"scripts": {
"test": "standard setup.js",
"prepublishOnly": "npm --no-git-tag-version version $TRAVIS_TAG"
"prepublishOnly": "npm --no-git-tag-version version $TRAVIS_TAG",
"install": "node setup.js"
},
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const path = require('path')
const packageJson = require('./package.json')
const jestConfig = require('./jest.json')

if (!packageJson.jest) {
process.exit()
}

const deleteFile = fileName => fs.unlinkSync(path.join(__dirname, fileName))
const writeFile = (fileName, data) => fs.writeFileSync(path.join(__dirname, fileName), data)

Expand Down

0 comments on commit a332cb6

Please sign in to comment.