platform-config
Description
Fetch and validate platform configurations more easily
Installation
$ npm install --save platform-config
If you'd like to try these examples, please run gulp prepare-examples
first
// ./examples/easy/index.js 'use strict'; var path = ;var platformConfig = ; var platforms = ; var current = platformscurrent;console;
In targets
are the following files:
// ./examples/easy/targets/development.js 'use strict'; var config = description: 'BY THE POWER OF DEVELOPMENT'; moduleexports = config;
// ./examples/easy/targets/production.js 'use strict'; var config = description: 'BY THE POWER OF PRODUCTION'; moduleexports = config;
$ node examples/easy
$ node examples/easy --NODE_ENV production
$ export NODE_ENV=production$ node examples/easy
You can test and unset NODE_ENV
like so:
$ echo $NODE_ENVproduction$ unset NODE_ENV$ echo NODE_ENV
Running tests
$ gulp test
Test reports are written to ./reports
.
Contributing
- Do pull requests.
- Make sure there's tests and meaningful coverage.
- Respect
./eslintrc
. - Issues should go in issues.