component-api
v1.0.4
Published
API for creating, building, and installing components
Downloads
13
Readme
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-api
API
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 buildoptions
dev: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.