0.1.8 • Published 6 years ago

@please.com/serverless-scripts v0.1.8

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

Installation

$ npm install --save-dev @please.com/serverless-scripts

This is supposed to be installed in the dev dependencies of a project.

Usage

This package ships with serverless-webpack plugin, to enable it just add it to serverless.yml

plugins:
  - serverless-webpack

custom:
  webpack:
    webpackConfig: node_modules/@please.com/serverless-scripts/webpack.config.js

package:
  individually: true

It also contains two commands to format & lint the code. Add the following to package.json

// package.json

"scripts": {
  // other npm scripts ...
  "format": "serverless-scripts format",
  "lint": "serverless-scripts lint",
}

Now to make the editor pickup ESLint and Prettier config files

$ ln -s ./node_modules/@please.com/serverless-scripts/.{eslint,prettier}* .

yarn format

It uses Prettier and ships a minimal config to format all the source files inside the project.

yarn lint

Uses ESLint v4 to lint all the files, by default it uses airbnb-base, but you can override that in case you feel the need to.

Inspiration

This is inspired by create-react-app & kcd-scripts

License

MIT