Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antitim/cedr-deps
Generating globs dependencies for cedr
https://github.com/antitim/cedr-deps
cedr
Last synced: about 1 month ago
JSON representation
Generating globs dependencies for cedr
- Host: GitHub
- URL: https://github.com/antitim/cedr-deps
- Owner: antitim
- License: mit
- Created: 2016-11-06T19:37:05.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-06T19:50:53.000Z (about 8 years ago)
- Last Synced: 2024-10-10T09:25:39.824Z (3 months ago)
- Topics: cedr
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cedr-deps [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
> Cedr-deps - Generating globs dependencies for cedr.
## Installation
```sh
$ npm install --save cedr-deps
```## Usage
Used in conjunction with [cedr](https://github.com/antitim/cedr). Needed to generating globs dependencies for page.
```js
const deps = require('cedr-deps');let library = {
'menu': {
templates: {
'menu': 'Menu',
'__item': 'Menu item'
},
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: [] }```
## API### cedr-deps(page, library)
#### page
Type: `Object`The object of page.
#### library
Type: `Object`The object of library.
Returns a `Object`:
```js
{
style: [],
script: []
}
```## License
MIT © [antitim](http://vk.com/antitim)
[npm-image]: https://badge.fury.io/js/cedr-deps.svg
[npm-url]: https://npmjs.org/package/cedr-deps
[travis-image]: https://travis-ci.org/antitim/cedr-deps.svg?branch=master
[travis-url]: https://travis-ci.org/antitim/cedr-deps
[daviddm-image]: https://david-dm.org/antitim/cedr-deps.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/antitim/cedr-deps