Skip to content
All-in-one development toolkit for creating node modules with Jest, Prettier, ESLint, and Standard
JavaScript Shell Other
Branch: master
Clone or download
Latest commit c39c5b8 Sep 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
create-modern-node v1.0.7 Sep 21, 2019
src Update prettier-standard Sep 28, 2019
template-typescript v1.0.7 Sep 21, 2019
template v1.0.7 Sep 21, 2019
test v1.0.7 Sep 21, 2019
.gitignore Install from .tgz for tests Sep 21, 2019
.prettierignore Fix git dir detection Sep 20, 2019
.travis.yml Force postinstall scripts Sep 21, 2019
Dockerfile Add testing Dockerfile Sep 21, 2019
LICENSE v1.0.7 Sep 21, 2019
README.md Update README.md Sep 28, 2019
package.json Update prettier-standard Sep 28, 2019
yarn.lock Update yarn.lock Sep 28, 2019

README.md

Modern Node Unix CI Modern Node

All-in-one development toolkit for creating node modules with Jest, Prettier, ESLint, and Standard

  • 🃏 Testing with Jest
  • 💅 Formatting with prettier
  • 🌟 Linting with eslint configured on standard rules
  • 🐶 Automatically runs precommit script from package.json from when committing code

Installation (new projects)

yarn create modern-node my-module

If you're using npm: npm init modern-node my-module.

Installation (existing projects)

yarn add --dev modern-node

If you're using npm: npm install --save-dev modern-node.

Now you add appropriate scripts to your package.json:

{
  "scripts": {
    "test": "modern test",
    "format": "modern format",
    "lint": "modern lint",
    "precommit": "modern precommit"
  }
}

Usage

Test your project with Jest (watch mode, unless running on CI server):

modern test

Format all files in the project with prettier-standard (add --help for more options):

modern format             # format all files
modern format --changed   # format only changed files
modern format '**/*.js'   # format only selected files

Format and files in the project (add --help for more options):

modern lint             # lint all files
modern lint --changed   # lint only changed files
modern lint '**/*.js'   # lint only selected files

Format and lint staged changes (useful to put into precommit script):

modern precommit

For now linted extensions can be configured with lint-staged option in package.json.

License

MIT

You can’t perform that action at this time.