2.0.1 • Published 9 years ago
neuron-json v2.0.1
neuron-json
The utility to read neuron.json
Install
$ npm install neuron-json --saveUsage
var nj = require('neuron-json');
var cwd = '/path/to/package';
nj.read(cwd, function (err, json){
// ...
});- cwd
paththe current working directory - err
Error - json
Objectsee below
json
Contains the fields below at least:
- name
Stringthe package name of the package - main
path=the filename(relative tocwd) of the main entry, if there is no main entry, there will be nomainkey injson - entries
Array.<path>if there's no entries, it will be an empty array.
process.env.NEURON_NO_TEST_ENTRY
If process.env.NEURON_NO_TEST_ENTRY is specified, then neuron-json will not include test entries automatically.
License
MIT