gulp-order-bemdeps
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.
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.