esnext-scripts
Opinionated ESNext application scripts and configurations
Last updated 3 months ago by jimzhan .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install esnext-scripts 
SYNC missed versions from official npm registry.

esnext-scripts

Opinionated ESNext application scripts and configurations.

CircleCI npm version JavaScript Style Guide Styled with Prettier Commitizen friendly npm downloads

Install

npm install esnext-scripts

or yarn

yarn add esnext-scripts

What?

esnext-scripts is set of pre-configured helpers for your next generation Javascript application. With it, you can now fully focus on your valuable implementations instead of playing around with various settings & helpers over and over again. Batteries included:

Why?

How much time you had spent on configuring your application boilerplate to make it support the "future" JavaScript spec. each time you start a new project?

How many times you had been confused by the obsolete babel settings (plugins, presets) or even worse, your applications got broken?

How?

Available commands

  • esnext build <src> <out> - compile an input directory of modules into an output directory.
  • esnext exec <script> [--watch] [--env] - execute a Node.js script with ESNext supports.
  • esnext format <glob> - format files find by the given glob pattern via prettier.
  • esnext lint [optional-folder] - start linting with standardjs rules set.
  • esnext test - start executing your Jest test specs, custom settings supported via (by order):
    • <cwd>/jest.config.js
    • <cwd>/package.json#jest

Available config

  • eslint

Sample Usage

  1. .eslintrc.js
const config = require('esnext-scripts')

module.exports = config.eslint
  1. A sample structure of React application folder.
- src/
    App.jsx
    App.test.jsx

App.test.jsx.

import React from 'react'
import { shallow } from 'enzyme'
import App from './App'

describe('<App />', () => {
  it('renders <App /> component', () => {
    const wrapper = shallow(<App>Application</App>)
    expect(wrapper).toBeTruthy()
  })
}

package.json.

  "lint-staged": {
    "**/*.{js,jsx}": [
      "esnext format 'src/**/*.js",
      "esnext lint --fix"
    ]
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged",
      "commit-msg": "commitlint --env HUSKY_GIT_PARAMS"
    }
  },
  "scripts": {
    "lint": "esnext lint",
    "lint:other-folder": "esnext lint other-folder",
    "start": "yo-env":,
    "start:development": "esnext exec --watch src/index.js",
    "start:production": "esnext exec --env ../.env src/index.js",
    "test": "esnext test"
  },

License

MIT License 2019 © Jim Zhan

Current Tags

  • 1.5.2                                ...           latest (3 months ago)

69 Versions

  • 1.5.2                                ...           3 months ago
  • 1.5.1                                ...           3 months ago
  • 1.4.0                                ...           4 months ago
  • 1.3.3                                ...           5 months ago
  • 1.3.2                                ...           5 months ago
  • 1.3.1                                ...           5 months ago
  • 1.3.0                                ...           5 months ago
  • 1.2.4                                ...           5 months ago
  • 1.2.3                                ...           5 months ago
  • 1.2.2                                ...           5 months ago
  • 1.2.1                                ...           5 months ago
  • 1.2.0                                ...           5 months ago
  • 1.1.2                                ...           5 months ago
  • 1.1.1                                ...           5 months ago
  • 1.1.0                                ...           5 months ago
  • 1.0.8                                ...           5 months ago
  • 1.0.7                                ...           5 months ago
  • 1.0.6                                ...           6 months ago
  • 1.0.5                                ...           6 months ago
  • 1.0.4                                ...           6 months ago
  • 1.0.3                                ...           6 months ago
  • 1.0.2                                ...           6 months ago
  • 1.0.1                                ...           6 months ago
  • 0.32.2                                ...           a year ago
  • 0.32.1                                ...           a year ago
  • 0.32.0                                ...           a year ago
  • 0.31.0                                ...           a year ago
  • 0.30.1                                ...           a year ago
  • 0.30.0                                ...           a year ago
  • 0.29.0                                ...           a year ago
  • 0.28.2                                ...           a year ago
  • 0.28.1                                ...           a year ago
  • 0.28.0                                ...           a year ago
  • 0.27.0                                ...           a year ago
  • 0.26.0                                ...           a year ago
  • 0.25.0                                ...           a year ago
  • 0.24.3                                ...           a year ago
  • 0.23.0                                ...           a year ago
  • 0.22.0                                ...           a year ago
  • 0.21.0                                ...           a year ago
  • 0.20.1                                ...           a year ago
  • 0.20.0                                ...           a year ago
  • 0.19.0                                ...           a year ago
  • 0.18.0                                ...           a year ago
  • 0.17.0                                ...           a year ago
  • 0.16.3                                ...           a year ago
  • 0.16.2                                ...           a year ago
  • 0.16.1                                ...           a year ago
  • 0.16.0                                ...           a year ago
  • 0.15.0                                ...           a year ago
  • 0.14.0                                ...           a year ago
  • 0.13.3                                ...           a year ago
  • 0.13.1                                ...           a year ago
  • 0.13.0                                ...           a year ago
  • 0.12.0                                ...           a year ago
  • 0.11.0                                ...           a year ago
  • 0.10.5                                ...           a year ago
  • 0.10.4                                ...           a year ago
  • 0.10.3                                ...           a year ago
  • 0.10.2                                ...           a year ago
  • 0.10.0                                ...           a year ago
  • 0.9.3                                ...           a year ago
  • 0.9.2                                ...           a year ago
  • 0.9.0                                ...           a year ago
  • 0.8.0                                ...           a year ago
  • 0.7.1                                ...           a year ago
  • 0.6.5                                ...           a year ago
  • 0.6.3                                ...           a year ago
  • 0.5.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 70
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |