# gulp-css-snippets

> Gulp module for CSS snippets require from remote server

Latest version **1.0.1** (published 2016-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-css-snippets
pnpm add gulp-css-snippets
yarn add gulp-css-snippets
bun add gulp-css-snippets
```

## 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.1 |
| Published | 2016-12-14 |
| First published | 2016-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | 2create |
| Maintainers | htmlburger |
| Keywords | gulp, css, require, snippets |

## Links

- npm: https://www.npmjs.com/package/gulp-css-snippets
- Repository: https://github.com/2createStudio/gulp-css-snippets
- Homepage: https://github.com/2createStudio/gulp-css-snippets#readme
- Issues: https://github.com/2createStudio/gulp-css-snippets/issues
- npm.io page: https://npm.io/package/gulp-css-snippets

## Dependencies (4)

- [vinyl](https://npm.io/package/vinyl.md) ^2.0.1
- [request](https://npm.io/package/request.md) ^2.79.0
- [through2](https://npm.io/package/through2.md) ^2.0.3
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7

## 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.1 (latest) — 2016-12-14
- 1.0.0 — 2016-11-23

## README

# Gulp CSS Snippets

Gulp module for CSS snippets require from remote server.


## Usage
In your `gulpfile.js`:
```
var cssSnippets = require('gulp-css-snippets');

gulp.src('./css/snippet-require.css')
	.pipe(cssSnippets({
	    fileName: 'snippet-components.css',
	    base: 'https://rawgit.com/2createStudio/postcss-require-lib/master/snippets/'
	}))
	.pipe(gulp.dest('./css'));
```

The require file (`snippet-require.css`) should use this syntax:
```
import('snippetFoo');
import('snippetBar');
```

The structure on the remote server should look like this:

```
mainDir
+-- snippetFoo
|   +-- main.css
|   +-- README.md
+-- snippetBar
|   +-- main.css
|   +-- README.md
```

The content of `snippetFoo/main.css` will be the contactenated content of the snippet `main.css` files.

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