Skip to content

uphold/uphold-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uphold-scripts

npm

Set of NPM scripts and dev dependencies to help with common tasks on Uphold projects.

Available Scripts

  • changelog - generate changelog file for a given version
  • lint - run eslint to lint JS files
  • release - cut a new release for a new version
  • test - run the test suite with jest pre-configured
  • version - tag a new version and generate its changelog

Installation

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

License

MIT