0.1.2 • Published 9 years ago

bem-deps v0.1.2

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

bem-deps

NPM version Build Status Coverage Status Dependency Status

This module reads deps.js files from requested bem block recursivly and returns a Stream of bem objects which can be queried for files.

deps.js file exports object with require and/or expect property:

// foo.deps.js
export.require = ['one-block', 'two-block', {block: 'three-block'}];
export.expect = ['after'];

Required blocks will be added to stream before foo block and expected blocks will be added after foo.

All elements of require and expect are normalized with deps-normalize be default.

API

bem(levels, options)

Returns object with deps method.

levels

Type: Array

Enumerates level folders, that should be used in blocks search.

options

Type: Object

deps(bem)

Returns Stream of BEM objects - all dependencies for bem block.

Stream emits dependencies in order, that defined by require and expect of corresponding BEM objects and levels of declaration.

bem

Type: string

Bem entity path:

deps('level/block');
deps('level/block__elem');
deps('level/block_mod');

License

MIT (c) 2014 Vsevolod Strukchinsky

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago