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 | 6 سال پیش | |
---|---|---|
test | 7 سال پیش | |
.gitignore | 10 سال پیش | |
.travis.yml | 9 سال پیش | |
LICENSE | 11 سال پیش | |
README.md | 6 سال پیش | |
index.js | 6 سال پیش | |
package.json | 6 سال پیش |
Concatenates css files, bubbling up @import statements (as per the standard), and optionally rebasing urls and inlining local @import statements.
Install with npm.
npm install --save-dev gulp-concat-css
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.
concatCss(targetFile, options)
targetFile
: The relative path of the generated file containing the concatenated cssoptions
: (since 2.1.0)
inlineImports
: (default true
) Inline any local import statement foundrebaseUrls
: (default true
) Adjust any relative URL to the location of the target file.includePaths
: (default []
) Include additional paths when inlining importscommonBase
: (default to the base
property of the first file) Common base path from which files and urls resolveMIT @ Mario Casciaro