Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-concat-style with all npm packages installed. Try it out:

var gulpConcatStyle = require("gulp-concat-style")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-concat-style v0.1.0

concat style file according to the grouping rules

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

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free