You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tools of postcss like postcss-cli or gulp-postcss can be used to preserve the relative paths of each src CSS files.
175
-
There is some conditions in postcss-copy where we keep the structure directories and others where we not based on the `to` and `from` postcss options.
176
-
177
-
These are the rules:
178
-
- If the `to` option is not set, postcss-copy is going to use the `dest` path and will not preserve the original path.
179
-
- If the `to` option is set and is the same as `from` (e.g: gulp-postcss do that by default) is going to preserve the directory structure.
180
-
- If you are running postcss for multiple files (e.g: in gulp-postcss `gulp.src('src/**/*.css')`) and `to` option is set, you have to change `preservePath` to true.
181
-
182
188
#### <aname="using-postcss-import"></a> Using copy with postcss-import
183
189
[postcss-import](https://github.com/postcss/postcss-import) is a great plugin that allow us work our css files in a modular way with the same behavior of CommonJS.
184
190
@@ -252,7 +258,7 @@ The lifecyle of the copy process is:
252
258
10. Define template for the new asset
253
259
11. Add ```resultAbsolutePath``` and ```extra``` properties in the fileMeta object
254
260
12. Write in destination
255
-
13. Write the new URL in the PostCSS node value. ([read more about preserving paths](#preserving-paths))
0 commit comments