11# gulp-cssimport
22Parses a CSS file, finds imports, grabs the content of the linked file and replaces the import statement with it.
33
4- INSTALL
5- -------
4+ ## INSTALL
65``` sh
76npm install gulp-cssimport
87```
98
10- USAGE
11- -----
9+ ## USAGE
1210``` js
1311var gulp = require (" gulp" );
1412var cssimport = require (" gulp-cssimport" );
@@ -20,8 +18,7 @@ gulp.task("import", function() {
2018});
2119```
2220
23- OPTIONS
24- -------
21+ ## OPTIONS
2522#### includePaths
2623Array, default: ` [] `
2724Additional paths to resolve imports.
@@ -90,8 +87,7 @@ var options = {
9087};
9188```
9289
93- TIPS AND TRICKS
94- ---------------
90+ ## TIPS AND TRICKS
9591** Be more precise and do not add to src importing file without necessary:**
9692``` css
9793// main .css
@@ -106,15 +102,13 @@ Do instead: `gulp.src("main.css")`
106102If you need exclude files from import, try use ` filter ` only option (it is faster) and avoid others.
107103
108104
109- POSTCSS
110- -------
105+ ## POSTCSS
111106There are plugins for [ PostCSS] ( https://github.com/postcss/postcss ) which do same job or even better:
112107* [ postcss-import] ( https://github.com/postcss/postcss-import ) inlines the stylesheets referred to by ` @import ` rules
113108* [ postcss-import-url] ( https://github.com/unlight/postcss-import-url ) inlines remote files.
114109
115110
116- SIMILAR PROJECTS
117- ----------------
111+ ## SIMILAR PROJECTS
118112https://npmjs.org/package/gulp-coimport/
119113https://npmjs.org/package/gulp-concat-css/
120114https://github.com/yuguo/gulp-import-css/
@@ -125,53 +119,11 @@ https://github.com/jfromaniello/css-import
125119https://github.com/mariocasciaro/gulp-concat-css
126120
127121
128- KNOWN ISSUES
129- ------------
122+ ## KNOWN ISSUES
130123- Cannot resolve ` @import 'foo.css' (min-width: 25em); `
131124
132- TODO
133- ----
125+ ## TODO
134126- Cache
135127
136- CHANGELOG
137- ---------
138- 6.0.1 [ 23 Feb 2018]
139- - fixed potential catastrophic backtracking vulnerability
140-
141- 6.0.0 [ 01 Sep 2017]
142- - remove byte order mask from imported files
143-
144- 5.1.0 [ 13 Aug 2017]
145- - added option 'transform'
146-
147- 5.0.0 [ 20 Nov 2016]
148- - added option 'skipComments'
149-
150- 4.0.0 [ 06 Oct 2016]
151- - added option 'includePaths'
152-
153- 3.0.0 [ 28 Feb 2016]
154- - removed node streams support, now only gulp
155- - removed directory option
156- - added sourcemaps support
157- - fixed bogus destination bugs
158-
159- 2.0.0 [ 30 Jun 2015]
160- - changed parse algorithm
161- - can handle recursive import
162- - can handle minified css files
163- - added option 'matchPattern'
164-
165- 1.3.0 [ 14 Nov 2014]
166- - added option 'extensions'
167- - added option 'filter'
168-
169- 1.2.0 [ 15 Feb 2014]
170- - fixed processing urls
171-
172- 1.1.0 [ 15 Feb 2014]
173- - switched to through2
174- - process files asynchronously
175-
176- 1.0.0 [ 12 Feb 2014]
177- - first release
128+ ## CHANGELOG
129+ See [ CHANGELOG] ( CHANGELOG.md )
0 commit comments