Skip to content

2createStudio/gulp-css-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Gulp module for CSS snippets require from remote server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published