Package Exports
- postcss-single-charset
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-single-charset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
postcss-single-charset
A PostCSS plugin for popping first @charset rule up in CSS file
SYNOPSIS
Sometimes concatenated CSS file has @charset
directive in the middle or has
many @charset
directives:
.foo {
color: red;
}
@charset "Shift_JIS";
.bar {
color: green;
}
@charset "Shift_JIS";
.baz {
color: blue;
}
This PostCSS plugin fixes these invalid @charset
like this:
@charset "Shift_JIS";
.foo {
color: red;
}
.bar {
color: green;
}
.baz {
color: blue;
}
INSTALL
$ npm install postcss-single-charset
USAGE
var fs = require("fs");
var postcss = require("postcss");
var css = fs.readFileSync("input.css", "utf8");
postcss([
require("postcss-single-charset")()
]).process(css).then(function (result) {
fs.writeFileSync("output.css", result.css);
});