# gulp-concat-css-import

> a gulp plugin, concat `@import` in css file for one

Latest version **1.0.5** (published 2017-11-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-concat-css-import
pnpm add gulp-concat-css-import
yarn add gulp-concat-css-import
bun add gulp-concat-css-import
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2017-11-13 |
| First published | 2017-11-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jser.org |
| Maintainers | xiaohuoche |
| Keywords | gulp, css, concat, import |

## Links

- npm: https://www.npmjs.com/package/gulp-concat-css-import
- Repository: https://github.com/toobull/gulp-concat-css-import
- Homepage: https://github.com/toobull/gulp-concat-css-import#readme
- Issues: https://github.com/toobull/gulp-concat-css-import/issues
- npm.io page: https://npm.io/package/gulp-concat-css-import

## Dependencies (3)

- [flkit](https://npm.io/package/flkit.md) ^3.0.11
- [through2](https://npm.io/package/through2.md) ^2.0.3
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.8

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2017-11-13
- 1.0.4 — 2017-11-13
- 1.0.3 — 2017-11-09
- 1.0.2 — 2017-11-08
- 1.0.1 — 2017-11-05
- 1.0.0 — 2017-11-04

## README

## gulp-concat-css-import

## Quick Start

### 1.Installation

```bash
$ npm install --save gulp-concat-css-import
```

### 2.Usage
My css file is `combo.css`, '/resource/css/combo/src/combo.css' is relative path at website's root.
```css
@import url(../../page/hehe1.css);
@import url(../../page/hehe2.css);
```
hehe1.css
```css
.hehe1{
    color: #444;
}
```
hehe2.css
```css
@import url(hehe3.css);
.hehe2{
    background-color: #f00;
}
```
hehe3.css
```css
.hehe3{
    color: #000;
}
```
Finally, concated file is '/resource/css/combo/dest/combo.css', it's content as the following:
```css

/**import from `/resource/css/page/hehe1.css` **/
.hehe1{color:#444;}

/**import from `/resource/css/page/hehe2.css` **/

/**import from `/resource/css/page/hehe3.css` **/
.hehe3{color:#000;}
.hehe2{background-color:#f00;}
```

In my gulp file written like this:
```js
let concatImport = require('gulp-concat-css-import')

let rootPath = '/website/root/absolute/path'
let cssSrc = '/the/path/is/resource/css/combo/src'
let cssDest = '/the/path/is/resource/css/combo/dest'

gulp.task ('css', function () {
    gulp.src (cssSrc+'/**/*.css')
        .pipe (concatImport ({
            rootPath : rootPath,
            isCompress : false
        }))
        .pipe (gulp.dest (cssDest))
})
```

---
_Source: https://npm.io/package/gulp-concat-css-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
