https://github.com/2createstudio/gulp-css-snippets
Gulp module for CSS snippets require from remote server
https://github.com/2createstudio/gulp-css-snippets
Last synced: about 1 year ago
JSON representation
Gulp module for CSS snippets require from remote server
- Host: GitHub
- URL: https://github.com/2createstudio/gulp-css-snippets
- Owner: 2createStudio
- License: mit
- Created: 2016-11-23T15:11:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-14T08:42:09.000Z (about 9 years ago)
- Last Synced: 2025-02-09T19:02:47.239Z (about 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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.