Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fengyuanchen/postcss-header

Add a header to a file.
https://github.com/fengyuanchen/postcss-header

banner css header postcss postcss-plugin

Last synced: about 1 month ago
JSON representation

Add a header to a file.

Awesome Lists containing this project

README

        

# postcss-header

[![Downloads](https://img.shields.io/npm/dm/postcss-header.svg)](https://www.npmjs.com/package/postcss-header) [![Version](https://img.shields.io/npm/v/postcss-header.svg)](https://www.npmjs.com/package/postcss-header)

> Add a header to a file.

## Install

```shell
npm install postcss-header postcss --save-dev
```

## Usage

```js
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](https://semver.org/).

## License

[MIT](https://opensource.org/licenses/MIT) © [Chen Fengyuan](https://chenfengyuan.com/)