Skip to content

Commit

Permalink
fix: add post install
Browse files Browse the repository at this point in the history
  • Loading branch information
Theryston committed Sep 6, 2022
1 parent 18ef7b7 commit 4e3db2c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"watch": "jest --watch",
"snapupdate": "jest --updateSnapshot",
"coverage": "jest --coverage",
"postinstall": "prisma generate && tiktoker config",
"postinstall": "node scripts/postinstall.js",
"release": "pnpm semantic-release"
},
"files": [
Expand All @@ -40,6 +40,7 @@
"get-video-duration": "^4.1.0",
"gluegun": "latest",
"loading-cli": "^1.1.0",
"prisma": "^4.3.1",
"puppeteer": "^17.1.1"
},
"devDependencies": {
Expand All @@ -58,7 +59,6 @@
"jest": "^26.6.3",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"prisma": "^4.3.1",
"semantic-release": "^19.0.5",
"ts-jest": "^26.5.3",
"ts-node": "10.6.0",
Expand Down
4 changes: 3 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { execSync } = require('child_process')

try {
execSync('prisma generate')
} catch (error) {
console.log('Prisma generate failed', error)
}

try {
execSync('tiktoker config')
} catch (e) {
console.log('Has an error to run "tiktoker config", please run it manually')
}

0 comments on commit 4e3db2c

Please sign in to comment.