Skip to content

Commit

Permalink
chore: update husky
Browse files Browse the repository at this point in the history
  • Loading branch information
brett-vendia committed Feb 4, 2021
1 parent 907b8d0 commit a9b414e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
},
"husky": {
"hooks": {
"pre-push": "lint-staged && npm test",
"pre-commit": "lint-staged",
"pre-push": "npm test",
"commit-msg": "commitlint -e $GIT_PARAMS"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
"eslint --fix"
]
},
"commitlint": {
Expand Down Expand Up @@ -105,4 +105,4 @@
"path": "cz-conventional-changelog"
}
}
}
}
15 changes: 15 additions & 0 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node

function isTrue (value) {
return !!value && value !== '0' && value !== 'false'
}

const envDisable = isTrue(process.env.DISABLE_OPENCOLLECTIVE) || isTrue(process.env.OPEN_SOURCE_CONTRIBUTOR) || isTrue(process.env.CI)
const logLevel = process.env.npm_config_loglevel
const logLevelDisplay = ['silent', 'error', 'warn'].indexOf(logLevel) > -1

if (!envDisable && !logLevelDisplay) {
console.log('\u001b[96m\u001b[1mThank you for using Serverless Express by Vendia!\u001b[96m\u001b[1m')
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')
console.log('\u001b[0m\u001b[96mSign up for the Developer Preview at https://vendia.net?ref=se \u001b[22m\u001b[39m')
}

0 comments on commit a9b414e

Please sign in to comment.