You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a separate repo for the primary logic behind the component-build command.
Feel free to fork this or use it as a baseline to create your own builder.
This is a thin wrapper around component-builder2.
Some features included by default:
Scripts
ES6 Module support
Syntax error checking
JSON files and JSON syntax error checking
Templates as strings
Autorequires the bundle by default
Optional UMD wrap
Resolves the entry point of the bundle automatically
options are passed to all builders and plugins.
Options other than those supported by component-resolver and component-builder2 are:
prefix <''> - for rewriting URLs in CSS
browsers <''> - autoprefixer browser support
umd - wrap the build in a UMD build with name umd
autorequire - automatically require the entry point of the build
build.set(key, value)
Set or change an option after initialization.
build.set('development',false);
build.scripts(callback)
Builds the JS.
Returns function (err, js) {} where js is the build string.
If nothing was built, js === ''.
build.styles(callback)
Builds the CSS.
Returns function (err, css) {} where css is the build string.
If nothing was built, css === ''.
build.files(callback)
Builds the files.
Returns function (err) {}.
build.scriptPlugins(build, options)
Optionally override the default plugins used for .js builds.
build is a builder instance, and options are the options passed to Build.
You may overwrite this entirely if you'd like:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.