Skip to content

how to use it? #6

@a-x-

Description

@a-x-

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? 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions