Skip to content

Commit a332cb6

Browse files
authored
Merge pull request #28 from emin93/new-cli-post-install
Prepared automatic execution of the post install script
2 parents ea456ca + ffc9af3 commit a332cb6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "Clean and minimalist React Native template for a quick start with TypeScript.",
55
"scripts": {
66
"test": "standard setup.js",
7-
"prepublishOnly": "npm --no-git-tag-version version $TRAVIS_TAG"
7+
"prepublishOnly": "npm --no-git-tag-version version $TRAVIS_TAG",
8+
"install": "node setup.js"
89
},
910
"repository": {
1011
"type": "git",

setup.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ const path = require('path')
44
const packageJson = require('./package.json')
55
const jestConfig = require('./jest.json')
66

7+
if (!packageJson.jest) {
8+
process.exit()
9+
}
10+
711
const deleteFile = fileName => fs.unlinkSync(path.join(__dirname, fileName))
812
const writeFile = (fileName, data) => fs.writeFileSync(path.join(__dirname, fileName), data)
913

0 commit comments

Comments
 (0)