https://github.com/1999/gulp-order-bemdeps
Gulp plugin which reorders a stream of files using deps.js files contents
https://github.com/1999/gulp-order-bemdeps
bem gulp-plugins topological-sort
Last synced: about 1 month ago
JSON representation
Gulp plugin which reorders a stream of files using deps.js files contents
- Host: GitHub
- URL: https://github.com/1999/gulp-order-bemdeps
- Owner: 1999
- License: mit
- Created: 2015-11-06T04:34:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-18T18:59:25.000Z (about 6 years ago)
- Last Synced: 2024-04-25T21:21:26.014Z (about 1 year ago)
- Topics: bem, gulp-plugins, topological-sort
- Language: JavaScript
- Size: 637 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-order-bemdeps
[](https://greenkeeper.io/)
[](https://travis-ci.org/1999/gulp-order-bemdeps)
[](https://david-dm.org/1999/gulp-order-bemdeps#info=dependencies)
[](https://david-dm.org/1999/gulp-order-bemdeps#info=devDependencies)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](https://en.bem.info/technology/deps/about/#depsjs-syntax) 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
```javascript
'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.