1.15.0 • Published 4 years ago

ws-scripts v1.15.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

ws-scripts

CLI toolbox for common scripts for my JavaScript and TypeScript projects.

I may change this project drastically and without notice, so whilst I do not recommend you use this project directly, I highly recommend reading the source and making your own scripts project.

Installation

yarn add -D ws-scripts
# or
npm i -D ws-scripts

Scripts

pre-commit

ws-scripts comes with Husky and lint-staged. The pre-commit script will run prettier and linting over staged files. Add the following to your package.json:

{
  "husky": {
    "hooks": {
      "pre-commit": "ws-scripts pre-commit"
    }
  }
}

lint

ws-scripts comes with a rather strict ESLint configuration. By default it will run against your whole project, except files covered by your .gitignore, unless you provide your own eslintignore file or --ignore-path.

{
  "scripts": {
    "lint": "ws-scripts lint"
  }
}

The configuration will detect TypeScript and React projects and apply rules accordingly.

For IDE integration, add your own ESLint config and extend the provided config:

{
  "eslintConfig": {
    "extends": ["./node_modules/ws-scripts/dist/config/eslintrc"]
  }
}

The same can be done for the Prettier config:

{
  "prettier": "./node_modules/ws-scripts/dist/config/prettierrc"
}

Inspiration

This is heavily inspired by kcd-scripts. Check out Kent's blog posts: Concerning toolkits and Tools without config.

Licence

MIT

1.15.0

4 years ago

1.14.0

4 years ago

1.13.1

4 years ago

1.13.0

4 years ago

1.12.0

4 years ago

1.11.1

4 years ago

1.11.0

4 years ago

1.10.0

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago