gulp-concat-css

Concatenate css files, rebasing urls and inlining @import

16 个版本
安装
npm install gulp-concat-css
yarn add gulp-concat-css
pnpm add gulp-concat-css
bun add gulp-concat-css
README

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 wich resolving files and urls

License

MIT @ Mario Casciaro

版本列表
3.1.0 2018-03-06
3.0.0 2018-01-02
2.3.0 2016-05-17
2.2.0 2015-03-30
2.1.2 2015-03-23
2.1.1 2015-03-04
2.1.0 2015-02-13
2.0.0 2015-01-25
1.2.0 2015-01-24
1.1.1 2014-11-28
1.1.0 2014-10-18
1.0.0 2014-10-02
0.2.0 2014-10-02
0.1.4 2014-03-26
0.1.3 2014-02-25
0.1.1 2014-02-19