Concatenates css files, bubbling up import statements (as per the standard), and optionally rebasing urls and inlining local import statements.(evacuated from NSA/Microsoft Github)

Mario Casciaro 880c9b0962 Merge pull request #47 from mLuby/patch-1 hace 6 años
test 2266a2cba7 Drop dependency on deprecated `gulp-util` hace 7 años
.gitignore 3e2a7e271c (Fix #18) Allow to disable URL rebasing and import inlining hace 10 años
.travis.yml 830dbebe51 Fix #22 hace 9 años
LICENSE 889048a1ec First hace 11 años
README.md 7902815181 typo fix hace 6 años
index.js b585da1f62 Exposed commonBase to be assignable, instead of relying on "first file deciding that". hace 6 años
package.json 09bba96ae3 3.1.0 hace 6 años

README.md

gulp-concat-css

Build Status NPM version Dependency Status Downloads

Concatenates css files, bubbling up @import statements (as per the standard), and optionally rebasing urls and inlining local @import statements.

Install

Install with npm.

npm install --save-dev gulp-concat-css

Examples

var gulp = require('gulp');
var concatCss = require('gulp-concat-css');

gulp.task('default', function () {
  return gulp.src('assets/**/*.css')
    .pipe(concatCss("styles/bundle.css"))
    .pipe(gulp.dest('out/'));
});

TIP: for a proper import inlining and url rebase, make sure you set the proper base for the input files.

API

concatCss(targetFile, options)

  • targetFile: The relative path of the generated file containing the concatenated css
  • options: (since 2.1.0)
    • inlineImports: (default true) Inline any local import statement found
    • rebaseUrls: (default true) Adjust any relative URL to the location of the target file.
    • includePaths: (default []) Include additional paths when inlining imports
    • commonBase: (default to the base property of the first file) Common base path from which files and urls resolve

License

MIT @ Mario Casciaro