Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexsedeke/postcss-doc
PostCSS plugin create style guide as json
https://github.com/alexsedeke/postcss-doc
Last synced: 2 months ago
JSON representation
PostCSS plugin create style guide as json
- Host: GitHub
- URL: https://github.com/alexsedeke/postcss-doc
- Owner: alexsedeke
- License: other
- Created: 2015-07-13T09:23:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-13T20:45:42.000Z (over 9 years ago)
- Last Synced: 2024-10-22T22:45:22.490Z (3 months ago)
- Language: JavaScript
- Size: 118 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# postcss-doc [![wercker status](https://app.wercker.com/status/bff68cbb2ab30226b30a08f73d1f4f40/s/master "wercker status")](https://app.wercker.com/project/bykey/bff68cbb2ab30226b30a08f73d1f4f40)
[PostCSS](https://github.com/postcss/postcss) plugin to generate a style guide for Air.
CSS comments will be parsed through Markdown and saved in a generated JSON document.
## Install
```shell
$ npm install postcss-doc
```## Usage
Node.js:
```js
var fs = require('fs');
var postcss = require('postcss');
var doc = require('postcss-doc');var css = fs.readFileSync('input.css', 'utf-8');
var processedCSS = 'output.css';var options = {
name: "Project name"
};var output = postcss()
.use(doc(processedCSS, options))
.process(css)
.css;
```in [Gulp](https://github.com/gulpjs/gulp):
```js
var gulp = require('gulp');gulp.task('default', function () {
var postcss = require('gulp-postcss');
var processedCSS = 'output.css';
return gulp.src('src/*.css')
.pipe(postcss([
require('postcss-doc')(processedCSS, {
name: "Project name"
})
]))
.pipe(gulp.dest('build/'));
});
```## Example css
To be done!
## Options
- `options.name`: Project name
## License
The MIT License (MIT)
Copyright (c) 2015 Jan Nahody