Skip to content

Commit a9b414e

Browse files
committed
chore: update husky
1 parent 907b8d0 commit a9b414e

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
},
3333
"husky": {
3434
"hooks": {
35-
"pre-push": "lint-staged && npm test",
35+
"pre-commit": "lint-staged",
36+
"pre-push": "npm test",
3637
"commit-msg": "commitlint -e $GIT_PARAMS"
3738
}
3839
},
3940
"lint-staged": {
4041
"*.js": [
41-
"eslint --fix",
42-
"git add"
42+
"eslint --fix"
4343
]
4444
},
4545
"commitlint": {
@@ -105,4 +105,4 @@
105105
"path": "cz-conventional-changelog"
106106
}
107107
}
108-
}
108+
}

scripts/postinstall.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env node
2+
3+
function isTrue (value) {
4+
return !!value && value !== '0' && value !== 'false'
5+
}
6+
7+
const envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.env.OPEN_SOURCE_CONTRIBUTOR) || isTrue(process.env.CI)
8+
const logLevel = process.env.npm_config_loglevel
9+
const logLevelDisplay = ['silent', 'error', 'warn'].indexOf(logLevel) > -1
10+
11+
if (!envDisable && !logLevelDisplay) {
12+
console.log('\u001b[96m\u001b[1mThank you for using Serverless Express by Vendia!\u001b[96m\u001b[1m')
13+
console.log('\u001b[0m\u001b[96mVendia just released their Developer Preview of Vendia Share, a service that lets you share data with partners on a distributed ledger with ease!\u001b[22m\u001b[39m')
14+
console.log('\u001b[0m\u001b[96mSign up for the Developer Preview at https://vendia.net?ref=se \u001b[22m\u001b[39m')
15+
}

0 commit comments

Comments
 (0)