Cedr-deps - Generating globs dependencies for cedr.
$ npm install --save cedr-deps
Used in conjunction with cedr. Needed to generating globs dependencies for page.
const deps = require('cedr-deps');
let library = {
'menu': {
templates: {
'menu': '<div>Menu</div>',
'__item': '<div>Menu item</div>'
},
styles: {
'menu/style.css': 'test/lib1/menu/style.css'
},
scripts: {}
},
'page': {
templates: {},
styles: {
'page/style.css': 'test/lib1/page/style.css'
},
scripts: {}
}
}
let page = {
block: 'page',
content: [
{
block: 'text',
content: 'text'
},
{
block: 'page',
element: 'header',
content: 'Yeah!'
}
]
};
deps(page, library);
// Return { style: ['test/lib1/page/style.css'], script: [] }
Type: Object
The object of page.
Type: Object
The object of library.
Returns a Object
:
{
style: [],
script: []
}
MIT © antitim