Set of NPM scripts and dev dependencies to help with common tasks on Uphold projects.
changelog
- generate changelog file for a given versionlint
- run eslint to lint JS filesrelease
- cut a new release for a new versiontest
- run the test suite with jest pre-configuredversion
- tag a new version and generate its changelog
Install the package via yarn
:
❯ yarn add uphold-scripts --dev
or via npm
:
❯ npm install uphold-scripts --save-dev
And then configure package.json
to look like this:
{
"scripts": {
"changelog": "uphold-scripts changelog $npm_package_version",
"lint": "uphold-scripts lint .",
"lint-staged": "lint-staged -q",
"release": "uphold-scripts release",
"test": "uphold-scripts test",
"version": "uphold-scripts version"
},
"pre-commit": [
"lint-staged"
],
"lint-staged": {
"*.{js,mjs}": ["uphold-scripts lint"]
}
}
To use the ESLint validations, this is the minimal .eslintrc.yml
required:
extends: uphold
MIT