builder-target
target build plugin for component-builder2.
Example
component.json
Let's say you have the following component, and you want to build
- one bundle for the web that use
api.js
- another one for your native app that use
api.cordova.js
You can define a new section in your component.json
(here we name it cordova) and use the plugin by calling .use('scripts', target('cordova'))
{
"cordova": {
"api.js": "api.cordova.js"
},
"scripts": [
"index.js",
"api.js"
],
"main": "index.js"
}
var fs = ;var build = ;var target = ; // build web bundlebuildscriptsnodes // build cordova bundlebuildscriptsnodes
License
The MIT License (MIT)