1.0.4 • Published 13 years ago
component-api v1.0.4
component-api
API for creating, building, and installing components. If you're looking for a command line interface, see component(1)
Installation
$ npm install component-apiAPI
var api = require('component-api');api.build(directory, options, callback)
Build a component in the given directory.
directory:string- The directory containing the component you wish to buildoptionsdev:bool- Build development dependenciesstandalone:string- Triggers a standalone build with the given name as the global createdout:string- The output directory for built files, defaults to./build. You can alternatively pass an object{js: Stream, css: Stream}name:string- Base name for build files defaulting to buildprefix:string- prefix css asset urls withprefix
callback(err, duration)- Callback called when complete with the time taken to build the components or an error if something went wrong.