Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

gulp-bem/gulp-bem-src

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

gulp-bem-src

DEPRECATED repository, moved to mono repository gulp-bem

Install

$ npm install --save-dev gulp-bem-src

Usage

const src = require('gulp-bem-src');

const postcss = require('gulp-postcss');
const postcssUrl = require('postcss-url');

src(
    ['libs/islands/common.blocks/', 'blocks']
    [{ block: 'button' }],
    'styles', // wished dependencies technology
    {
        skipResolvingDependencies: false, // false by default, set to true if you dont want to resolve deps
        techMap: { // use this to map internal techs to file techs
            styles: ['sass', 'styl', 'css']
        },
        config: {
            'libs/bem-core/common.blocks': { scheme: 'nested' },
            'libs/bem-core/desktop.blocks': { scheme: 'nested' },
            'libs/bem-components/common.blocks': { scheme: 'nested' },
            'libs/bem-components/desktop.blocks': { scheme: 'nested' },
            'libs/bem-components/design/common.blocks': { scheme: 'nested' },
            'libs/bem-components/design/desktop.blocks': { scheme: 'nested' },
            'common.blocks': { scheme: 'nested' },
            'desktop.blocks': { scheme: 'nested' }
        }
    }
)
.pipe(postcss([
    postcssUrl({ url: 'inline' })
]))
.pipe(concat(`${bundle.name()}.css`));