1
1
# gulp-cssimport
2
2
Parses a CSS file, finds imports, grabs the content of the linked file and replaces the import statement with it.
3
3
4
- INSTALL
5
- -------
4
+ ## INSTALL
6
5
``` sh
7
6
npm install gulp-cssimport
8
7
```
9
8
10
- USAGE
11
- -----
9
+ ## USAGE
12
10
``` js
13
11
var gulp = require (" gulp" );
14
12
var cssimport = require (" gulp-cssimport" );
@@ -20,8 +18,7 @@ gulp.task("import", function() {
20
18
});
21
19
```
22
20
23
- OPTIONS
24
- -------
21
+ ## OPTIONS
25
22
#### includePaths
26
23
Array, default: ` [] `
27
24
Additional paths to resolve imports.
@@ -90,8 +87,7 @@ var options = {
90
87
};
91
88
```
92
89
93
- TIPS AND TRICKS
94
- ---------------
90
+ ## TIPS AND TRICKS
95
91
** Be more precise and do not add to src importing file without necessary:**
96
92
``` css
97
93
// main .css
@@ -106,15 +102,13 @@ Do instead: `gulp.src("main.css")`
106
102
If you need exclude files from import, try use ` filter ` only option (it is faster) and avoid others.
107
103
108
104
109
- POSTCSS
110
- -------
105
+ ## POSTCSS
111
106
There are plugins for [ PostCSS] ( https://github.com/postcss/postcss ) which do same job or even better:
112
107
* [ postcss-import] ( https://github.com/postcss/postcss-import ) inlines the stylesheets referred to by ` @import ` rules
113
108
* [ postcss-import-url] ( https://github.com/unlight/postcss-import-url ) inlines remote files.
114
109
115
110
116
- SIMILAR PROJECTS
117
- ----------------
111
+ ## SIMILAR PROJECTS
118
112
https://npmjs.org/package/gulp-coimport/
119
113
https://npmjs.org/package/gulp-concat-css/
120
114
https://github.com/yuguo/gulp-import-css/
@@ -125,53 +119,11 @@ https://github.com/jfromaniello/css-import
125
119
https://github.com/mariocasciaro/gulp-concat-css
126
120
127
121
128
- KNOWN ISSUES
129
- ------------
122
+ ## KNOWN ISSUES
130
123
- Cannot resolve ` @import 'foo.css' (min-width: 25em); `
131
124
132
- TODO
133
- ----
125
+ ## TODO
134
126
- Cache
135
127
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