0.1.2 • Published 6 years ago

gulp-less-tree v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

gulp-less-tree

Gulp adapter for less-tree module. Generates less-tree json file.

status

Installation

Install package with NPM and add it to your development dependencies:

npm install --save-dev gulp-less-tree

Information

Usage

var gulpLessTree = require('gulp-less-tree');

gulp.task('scripts', function() {
  return gulp.src('./src/*.less')
    .pipe(gulpLessTree('dependencies.json'))
    .pipe(gulp.dest('./dist/'));
});

This will generate single file dependencies.json, containing dependency structure of your less files. The input file names (without the less extensions) will be used as keys and json objects containing dependencies will be the property values of the object. The resulting object is a json file. Example of such a generated file for files 'first.less', 'second.less' is:

{
  "first.less":{
    "dependency1.less":{}
   },
   "second.less":{
    "dependency2.less":{}
   }
}