roberto
v0.2.4
Published
Merges application dependencies configurations.
Downloads
5
Readme
roberto
I need to stab someone! Where's my stabbing knife?!
Merges application dependencies configurations.
Merge Order
app.json
andconf.json
files found in the module distributionpackage.json
meta data
Example Dependencies
// package.json snippets; see usage below for expected results
{
"name": "app-test1",
"version": "1.0.0",
"lazo": "dist"
}
{
"name": "app-test2",
"version": "1.0.0",
"dependencies": {
"underscore": "1.7.0"
},
"lazo": {
"application": "dist",
"app": {
"js": ["app/app2"]
},
"conf": {
"requirejs": {
"common": {
"paths": {
"appModule1": "app/module1/index"
}
}
}
},
"dependencies": {
"underscore": [{
"install": "common",
"moduleId": "underscore",
"conf": {
"requirejs": {
"common": {
"paths": {
"underscore": "app/underscore/index"
}
},
"client": {
"shim": {
"underscore": {
"exports": "_"
}
}
}
}
}
}]
}
}
}
Usage
var roberto = require('roberto');
// arguments
// 1. directory to scan
// 2. options
// 3. callback
roberto('test/application/node_modules', {}, function (err, results) {
// see results below based based on example dependencies
});
Results
// see dist dirs in test/application/node_modules for further details
{ app:
{ routes: { '': 'home-cmp', 'login(/)': 'login-cmp' },
css: [ 'app/skin.css', 'app/app.css' ],
js: [ 'app/app', 'moduleId1', 'app/app2' ] },
conf: { requirejs: { common: [Object], client: [Object] } },
modules:
[ { dependencies: undefined,
name: 'app-test1',
version: '1.0.0',
data: [Object],
lazo: 'dist',
path: '/Users/jstrimp/github.com/jstrimpel/roberto/test/application/node_modules/app-test1',
versions: undefined,
conf: [Object] },
{ dependencies: [Object],
name: 'app-test2',
version: '1.0.0',
data: [Object],
lazo: [Object],
path: '/Users/jstrimp/github.com/jstrimpel/roberto/test/application/node_modules/app-test2',
versions: undefined,
conf: [Object] } ] }