native-builder
v2.0.1
Published
A utility to build native packages according to your engine in Node.js
Downloads
9
Readme
native-builder
Utility to build native packages according to your engine
Have a problem? Come chat with us!
Installation
For native modules
$ [sudo] npm install native-builder --save
Add to your package.json
{
...
"scripts": {
"install": "native-builder build"
}
}
Engines
Engines allows you to complie native package accourding to the package engine.
The user of your package should add to his package.json
{
...
"engines": {
"electron": "0.30.1"
}
}
Available engines are electron
, atom-shell
, nw.js
and node-webkit
.
For more info look at which-native-nodish
Optional usage
cli
Installation
$ [sudo] npm install native-builder -g
Example
$ native-builder build
Options
$ native-builder --help
Usage: native-builder [command]
Commands:
resolve Resolve the build command
build Build native packages according to your engine
A cli tool to build native packages according to your engine
Options:
-h, --help output usage information
-V, --version output the version number
Programmatically
Installation
$ [sudo] npm install native-builder --save
Initialize
var nativeBuilder = require('native-builder');
resolve()
nativeBuilder.resolve()
.then(function (command) {
// command -> resolved command to execute
});
build(command)
Unistall a package
nativeBuilder.build('command to build with')
.then(function (exec) {
// exec -> the exec object from the build action
});
Run Tests
$ npm test