JSPM

postcss-single-charset

0.2.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3747
  • Score
    100M100P100Q16651F
  • License

Pop first @charset rule in CSS file.

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

Pop first @charset rule in CSS file.

INSTALL

$ npm install postcss-single-charset

USAGE

var fs = require('fs');
var postcss = require('postcss');

var input = fs.readFileSync('input.css', 'utf8');
var output = postcss().use(
  require('postcss-single-charset')()
).process(input).css;
fs.writeFileSync('output.css', output);

As Grunt plugin

This package also includes Grunt plugin. You can load like that:

grunt.loadNpmTasks('postcss-single-charset');

And configure like that:

grunt.initConfig({
  single_charset: {
    basic: {
      files: {
        'dest/basic.css': ['src/basic.css']
      }
    },

    with_options: {
      options: {
        map: {
          inline: false
        }
      },

      files: {
        'dest/with_options.css': ['src/with_options.css']
      }
    }
  }
});

options are mainly for Source Maps. See PostCSS document for more information.

LICENSE

MIT: http://hail2u.mit-license.org/2015