Browse Source

Allow inspecting the API default exports without erroring (#152)

v6-dev
Eli Perelman 8 years ago
committed by GitHub
parent
commit
ebf7879ca6
  1. 12
      packages/neutrino/src/index.js

12
packages/neutrino/src/index.js

@ -1,11 +1,11 @@
const Api = require('./api');
const Neutrino = require('./api');
const { partial } = require('ramda');
const Future = require('fluture');
const { getNodeEnv, toArray } = require('./utils');
// run :: (String command -> Array middleware -> Object options) -> Future Error a
const run = (command, middleware, options) => {
const api = Api(options);
const api = Neutrino(options);
process.env.NODE_ENV = getNodeEnv(command, api.options.args && api.options.args.env);
@ -37,10 +37,12 @@ const start = partial(run, ['start']);
const test = partial(run, ['test']);
module.exports = {
Neutrino: Api,
Neutrino,
run,
build,
inspect,
start,
test
test,
inspect(middleware, options = {}) {
return options.customInspect ? this : inspect(middleware, options);
}
};

Loading…
Cancel
Save