@servicensw/builder

1.2.4 • Public • Published

@servicensw/builder

PostCSS and Rollup config to build all @servicensw GEL packages.

Installation

npm install @servicensw/builder --save-dev

How to use

This package allows other GEL packages to build by themselves so they can have a dist folder included with the NPM package version.

Add the following lines to the @servicensw packages package.json file, substituting:

  • cssfile with the packages CSS filename.
  • es6file with the packages ES6 filename.
  • jsfile with the output JS file name (typically the ES6 filename, without .es6).
"scripts": {
  "build:css": "NODE_ENV=production ./node_modules/.bin/postcss src/cssfile --dir dist --config ./node_modules/@servicensw/builder/postcss.config.js",
  "build:js": "NODE_ENV=production ./node_modules/.bin/rollup src/es6file --o dist/jsfile --f iife --config ./node_modules/@servicensw/builder/rollup.config.js",
  "build": "npm run build:css && npm run build:js"
}

If you have multiple CSS files, add additional src/<css file> files seperated by a space.

If you have multiple JS files, you'll need to duplicate the entire command and seperate it with && as rollup can only handle one file at a time.

Readme

Keywords

none

Package Sidebar

Install

npm i @servicensw/builder

Weekly Downloads

0

Version

1.2.4

License

MIT

Unpacked Size

3.45 kB

Total Files

5

Last publish

Collaborators

  • larowlan
  • rikki_iki
  • acbramley
  • erinsnsw
  • dojob65
  • ramya.shankaralingam
  • mariam.khoudier
  • christine.roque
  • previousnext-admin
  • mcaddz
  • jptaranto