Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/fengyuanchen/postcss-header
- Owner: fengyuanchen
- License: mit
- Created: 2017-10-07T06:43:29.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2022-11-06T04:55:47.000Z (about 2 years ago)
- Last Synced: 2024-11-05T22:12:26.638Z (about 2 months ago)
- Topics: banner, css, header, postcss, postcss-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/postcss-header
- Size: 260 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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: bannerThe 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/)