bemdeps

0.0.7 • Public • Published

Converting jsdoc @deps directives to deps.js file

install

npm install bemdeps

or

npm install -g bemdeps

options

-l --levels bem levels (default is "blocks-desktop and blocks-common")
-t --tetchs bem tetchs (default is "css js bemhtml")
-f --forse will replace original deps.js file without extending

example

/**
 * @deps b-block1, b-block2 elem1 elem2, !b-block3 mod_val
 */

is equal to

/**
 * @shouldDeps b-block1, b-block2 elem1 elem2
 * @mustDeps b-block3 mod_val
 */

and will convenrts into

({
    "mustDeps": [
        {
            "block": "b-block3",
            "mods": {
                "mod": "val"
            }
        }
    ],
    "shouldDeps": [
        {
            "block": "b-block1"
        },
        {
            "block": "b-block2",
            "elems": [
                "elem1",
                "elem2"
            ]
        }
    ]
})

usage

bemdeps -l blocks-desktop blocks-touch blocks-common -t js css

Readme

Keywords

Package Sidebar

Install

npm i bemdeps

Weekly Downloads

8

Version

0.0.7

License

none

Last publish

Collaborators

  • wtfil