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

Latest commit

 

History

History
42 lines (34 loc) · 1.03 KB

README.md

File metadata and controls

42 lines (34 loc) · 1.03 KB

gulp-bem-bundler-fs

DEPRECATED repository, moved to mono repository gulp-bem

Install

$ npm install --save-dev gulp-bem-bundler-fs

Usage

const bundler = require('gulp-bem-bundler-fs');
const Builder = require('gulp-bem-bundle-builder');

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

// Configuring builder
const builder = Builder();

bundler('*.bundles/*')
    .pipe(builder({
        css: bundle => bundle.src('css')
            .pipe(stylus())
            .pipe(postcss([
                autoprefixer({
                    browsers: ['ie >= 10', 'last 2 versions', 'opera 12.1', '> 2%']
                }),
                postcssUrl({ url: 'inline' })
            ]))
            .pipe(csso())
            .pipe(concat(`${bundle.name}.css`))
    }));