postcss-uncomment
v1.1.0
Published
Uncomment one-line comments into CSS statements or rules.
Downloads
3
Maintainers
Readme
PostCSS Uncomment
PostCSS Uncomment lets you turn a comment into a CSS declaration.
// #uncomment @import "skip-sass.css";
/* becomes */
@import "skip-sass.css";
/* #uncomment @import "special-import"; */
/* becomes */
@import “special-import”;
This plugin was created while working on migrating a project from Sass to Postcss. Challenges arose due to the two types of imports being incompatible. The goal of this plugin is to avoid the situation of having to convert all of your styles in one change.
This plugin allows you to have imports for Sass and CSS files at the same time by hiding the CSS imports, running Node-Sass, un-hiding the CSS imports (by running this plugin) and finally running Postcss plugins (including postcss-import
) on the remaining styles.
You could have imports that look like:
@import "sass-file";
// #uncomment @import "css-file.css";
and by running: postcss-sass
-> postcss-uncomment
-> postcss-import
-> ...
these files could be properly processed with an expected output.