Skip to content

Gulp plugin which reorders a stream of files using deps.js files contents

License

Notifications You must be signed in to change notification settings

1999/gulp-order-bemdeps

Repository files navigation

gulp-order-bemdeps

Greenkeeper badge

Build Status Dependency Status DevDependency Status

Gulp plugin which reorders a stream of files using deps.js files contents. If you're not familiar with what BEM is or what deps.js files are used for, this link is for you.

Post on Medium.com: https://medium.com/@1999/bem-more-than-methodology-less-than-technology-4b66c42da6ef

Install

npm install gulp-order-bemdeps --save-dev

Basic Usage

'use strict';

let gulp = require('gulp');
let sass = require('gulp-sass');
let bemDepsOrder = require('gulp-order-bemdeps');

gulp.task('css', () => {
    gulp
        .src([
            'app/blocks/**/*.scss',
            'bower_components/bem-core/**/*.css',
            'app/ymodules/**/*.scss'
        ])
        .pipe(bemDepsOrder(gulp.src([
            'app/**/*deps.js'
        ])))
        .pipe(concat("all.css"))
        .pipe(sass().on('error', sass.logError))
        .pipe(gulp.dest("./"));
});

Options

The only argument is stream of vinyl deps.js files. Use gulp.src() for this.

About

Gulp plugin which reorders a stream of files using deps.js files contents

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published