spirit-config

1.0.2 • Public • Published

Spirit Config

Summary

The Spirit Config middleware will look for and parse the spirit config if one was no passed in. The middleware looks for the config in the following order

  1. Programmatically through the Spirit Core Api.
  2. Through the SPIRIT_CONFIG environment variable
  3. At the root directories "_config.json" file

Example

in Directory structure

- "rootDir"
  - "_config.json"

Programmatically
var config = {
  src : 'src',
  dest: 'build'
} ;
 
var SpiritCore = require( "spirit-core" ) ;
var spirit = new SpiritCore( './rootDir', config ) ;
Environment Variable
export SPIRIT_CONFIG="{ src : 'src', dest : 'build' }"
var SpiritCore = require( "spirit-core" ) ;
var spirit = new SpiritCore( './rootDir' ) ;
Config file
  var SpiritCore = require( "spiritCore" ) ;
  var spirit = new SpiritCor( "./rootDir" ) ;

Readme

Keywords

Package Sidebar

Install

npm i spirit-config

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • alexray