Modules
Basebuild works with modules. There is one module for each feature.
Every Basebuild's module is a property of modulesData
object and the same time every single one is an object too.
- utils
- build
- e2eTest
- inject
- proxy
- scripts
- styles
- unitTests
- watch
- server
- docs
- sonar
Why modulesData is an object? Why every module is an object?
Object is the best way to do a deep merge between custom and default options.
Example: There's a built-in server module, if you change only 1 property of the module, basebuild must keep all of the rest of default properties.
server : {
defaultValue : './server.js',
routes : {
'/bower_components': 'bower_components'
}
}
var options = {};
options.modulesData = {
server: {
routes: {
'/bower_components': 'bower_components',
'/vendor' : 'vendor'
}
}
};
server : {
defaultValue : './server.js',
routes : {
'/bower_components': 'bower_components',
'/vendor' : 'vendor'
}
}
Updated less than a minute ago