node package manager

gulp-concat-style

gulp-concat-style

npm version npm download npm dependencise

Concatenates style files less scss css according to the grouping rule;

Install

Install with npm

npm install --save-dev gulp-concat-style

Examples

var gulp = require('gulp');
var concatStyle = require('gulp-concat-style');
 
gulp.task('default', function() {
  return gulp
  .src('./src/*.less')
  .pipe(concatStyle({
    entry: '<filename>-<id>.less',
    output: '[filename].less'
  }))
  .pipe(gulp.dest('./build'))
})
test/retina
├── btn-0.less
├── btn-1.less
├── fest-5.less
├── fest-6.less
├── service-2.less
├── service-3.less
└── service-6.less

after:

test/build
├── btn.less
├── fest.less
└── service.less

Options

{
  entry: '<filename>-<id>.less', // required 
  output: '[filename].less'      // required 
}
  • entry: string Parsing format filename , use the <> to define a variable;
  • output: string Use the [] get variable by enrty variables;

License

MIT