Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use it? #6

Open
a-x- opened this issue May 16, 2016 · 0 comments
Open

how to use it? #6

a-x- opened this issue May 16, 2016 · 0 comments

Comments

@a-x-
Copy link
Member

a-x- commented May 16, 2016

my not working setup is:

'use strict';
const bemFind = require('bem-tools-find');
// find all client js (not bemhtml.js, priv.js and etc.)
bemFind({
    techs: ['js'],
}).pipe(process.stdout);

also i have two equal config files: .bemhint.js and .bemrc:

module.exports = {
    levels: [
        '*blocks'
    ],

    excludePaths: [
        'node_modules/**',
        'libs/**'
    ],

    plugins: {
        'bemhint-plugins/plugins/i-bem-html': true,
        'bemhint-plugins/plugins/i-bem': {
            excludePaths: [
                'common.blocks/b-page/*',
                'common.blocks/i-bem/__internal/*',
                'common.blocks/i-request/_type/*',
                'desktop.blocks/i-clipboard/__zeroclipboard/*'
            ]
        },
        'bemhint-plugins/plugins/i-bem__dom': {
            excludePaths: [
                'common.blocks/b-page/*'
            ]
        },
        'bemhint-plugins/plugins/i-bem__html': {
            excludePaths: [
              'common.blocks/i-bem/__i18n/_dummy/*'
            ]
        },
        'bemhint-plugins/plugins/i-bem__i18n': true,
        'bemhint-plugins/plugins/i-bem__internal': true
    }
};

error:

/Users/invntrm/lego/islands/node_modules/bem-tools-find/lib/util.js:60
        return config.levels || ['.'];
                     ^

TypeError: Cannot read property 'levels' of undefined
    at Object.getLevels (/Users/invntrm/lego/islands/node_modules/bem-tools-find/lib/util.js:60:22)
    at module.exports (/Users/invntrm/lego/islands/node_modules/bem-tools-find/lib/find.js:12:27)
    at Object.<anonymous> (/Users/invntrm/lego/islands/i18n-deps.js:19:1)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:148:18)
    at node.js:405:3

WAIDW?

Also, i looked in sources and my emotion is How it able to work? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant