Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sheerun/modern-node
All-in-one development toolkit for creating node modules with Jest, Prettier, ESLint, and Standard
https://github.com/sheerun/modern-node
es6 jest node prettier standard
Last synced: 28 days ago
JSON representation
All-in-one development toolkit for creating node modules with Jest, Prettier, ESLint, and Standard
- Host: GitHub
- URL: https://github.com/sheerun/modern-node
- Owner: sheerun
- License: mit
- Created: 2016-06-11T12:51:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:09:42.000Z (almost 2 years ago)
- Last Synced: 2024-04-13T21:56:29.236Z (8 months ago)
- Topics: es6, jest, node, prettier, standard
- Language: JavaScript
- Homepage:
- Size: 1.06 MB
- Stars: 242
- Watchers: 8
- Forks: 13
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs-cn - modern-node - **star:246** 用于创建具有Jest、Prettier、ESLint和Standard的节点模块的工具包 (资源 / 杂项)
- awesome-nodejs - modern-node - Toolkit for creating node modules with Jest, Prettier, ESLint, and Standard. (Resources / Miscellaneous)
README
# ![Modern Node](http://i.imgur.com/PqQAqwO.png) [![Unix CI](https://img.shields.io/travis/sheerun/modern-node/master.svg)](https://travis-ci.org/sheerun/modern-node) [![Modern Node](https://img.shields.io/badge/modern-node-9BB48F.svg)](https://github.com/sheerun/modern-node)
> All-in-one development toolkit for creating node modules with Jest, Prettier, ESLint, and Standard
- 🃏 Testing with [Jest](https://facebook.github.io/jest/)
- 💅 Formatting with [prettier](https://prettier.io/)
- 🌟 Linting with [eslint](https://eslint.org/) configured on [standard](https://standardjs.com/) 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](https://www.npmjs.com/): `npm init modern-node my-module`.
## Installation (existing projects)
```
yarn add --dev modern-node
```> If you're using [npm](https://www.npmjs.com/): `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](https://github.com/sheerun/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