Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tadatuta/valkyrie
bem-walk wrapper
https://github.com/tadatuta/valkyrie
Last synced: 10 days ago
JSON representation
bem-walk wrapper
- Host: GitHub
- URL: https://github.com/tadatuta/valkyrie
- Owner: tadatuta
- Created: 2015-05-01T19:53:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-01T14:09:54.000Z (about 9 years ago)
- Last Synced: 2024-10-23T20:51:10.311Z (22 days ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bem-valkyrie
A [bem-walk](https://github.com/bem/bem-walk) wrapper.
```js
var levels = [
'../../libs/bem-components/common.blocks',
'../../libs/bem-components/desktop.blocks',
'../../libs/bem-components/design/common.blocks',
'../../libs/bem-components/design/desktop.blocks'
];var Valkyrie = require('./valkyrie'),
valka = Valkyrie(levels);valka
.on('*', function(files) {
// all the files of all the entities
})
.on('block', function(files) {
// all blocks files
})
.on({ block: 'select' }, function(files) {
// all files of `select` block
})
.on({ tech: 'examples' }, function(files) {
// all files with `examples` tech
Valkyrie([files.path], { scheme: 'flat' })
.on({ tech: 'blocks' }, function(files) {
Valkyrie([files.path])
.on('*', function(files) {
console.log(files); // all files of custom blocks of an example
})
});
})
.on('end', function(files) {
console.log('end');
});
```