Package detail

postcss-header

fengyuanchen64kMIT3.0.3

Add a header to a file.

header, banner, postcss, postcss-plugin

readme

postcss-header

Downloads Version

Add a header to a file.

Install

npm install postcss-header postcss --save-dev

Usage

const postcss = require('postcss');
const header = require('postcss-header');
const result = postcss(header({
  header: '/* A simple header */',
})).process('.foo{}');

console.log(result);
// > /* A simple header */
// > .foo{}

Options

header

  • Type: String
  • Default: ''
  • Alias: banner

The string will be put at the beginning of the CSS file.

Versioning

Maintained under the Semantic Versioning guidelines.

License

MIT © Chen Fengyuan

changelog

Changelog

3.0.3 (Nov 6, 2022)

  • Use OnceExit instead of Once.

3.0.2 (Feb 13, 2022)

  • Drop deprecated postcss.plugin function.

3.0.1 (Sep 26, 2020)

  • Add missing entry file for ES Module.

3.0.0 (Sep 26, 2020)

  • Support ES Module.
  • Upgrade to PostCSS 8.

2.0.0 (Feb 24, 2020)

  • Upgrade to PostCSS 7.

1.0.0 (Oct 7, 2017)

  • The first release.