node package manager

neuron-builder

Wrap commonjs module/1.0 javascript files for <a href="http://github.com/kaelzhang/neuron">neuron</a>

neuron-builder

var builder = require('neuron-builder');
 
builder(file, options, callback)
  .on('warn', function(message){
    console.warn(message);
  });
  • filename String the pathname of the entry file to be parsed from
  • options Object
    • pkg: Object mixed package json format of project
    • cwd: String current working directory
    • compilers: Object|Array.<Object>
    • allow_implicit_dependencies: Boolean whether allows implicit dependencies. If true and a dependency is not found in pkg, it will be treated as the latest version.
  • callback function(err, content)

callback will get err, contents and parsed as its arguments, where:

  • err Error
  • content String the parsed content