StyleGuide Generator Node.jsを使ったスタイルガイドジェネレーター
First, install frontnote
:
npm install frontnote --save-dev
var FrontNote = require('frontnote');
var note = new FrontNote({
out: './docs'
});
note.render('path/**/*.css').subscribe(function() {
//callback
});
- Grunt - grunt-frontnote
- Gulp - gulp-frontnote
Type: Object
Default value: {}
Option. Please see options section for more information.
オプション 詳しくはオプションの項をご覧ください。
@Required
Type: String | Array
Pattern to be matched.
Please see the minimatch documentation for more details.
マッチさせたいパターン
詳しくはminimatchのドキュメントをご覧ください。
Type: Function
Default value: null
Call this function when generated style guide.
スタイルガイドが生成された後に実行するされる関数
Type: String
Default value: StyleGuide
Title of StyleGuide.
スタイルガイドのタイトル
ログを詳細に表示します
Type: String
Default value: __dirname + '/styleguide.md''
StyleGuide overview file's path. Overview file is required Markdown format.
index.htmlに表示するオーバービューファイル(マークダウン)のパス
オーバービューファイルはマークダウン形式です。
Type: String
Default value: __dirname + '/template''
StyleGuide template path.
スタイルガイドのテンプレートパス
Type: String
Default value: assets/**/*
The path of the file you want to copy the generated directory.
生成されたディレクトリにコピーしたいファイルパス
Type: String
Default value: ./frontnote
Directory in which to generate a style guide.
Type: String|Array
Default value: ./style.css
Path of CSS that you want to read in HTML. In the array or string.
HTMLに読み込みたいCSSのパス。文字列または配列で指定します。
Type: String|Array
Default value: null
Path of JS that you want to read in HTML. In the array or string.
HTMLに読み込みたいJSのパス。文字列または配列で指定します。
Type: Boolean
Default value: false
Clean files and folder from options.out directory.
出力先ディレクトリとファイルを削除します。
Type: Boolean
Default value: false
Display a detailed log
ログを詳細に表示します
Type: Object
Default value: {}
Custom variables for using ejs templates.
ejsテンプレート内で使う任意の変数を定義できます。
テンプレートはfrontnote-templateを参考にカスタマイズできます
Only 1 comment block in a file.
1ファイルに1つき1ブロックだけ記述できます。
/*
#overview
fileoverview title
fileoverview comment
*/
Section of style guide. '@' means attribute of this section. (ex. @deprecated @todo)
各スタイルごとに記述します。
@をつけるとこのセクションに属性ラベルをつけることができます(例: @非推奨, @todo)
/*
#styleguide
style title
style comment.
@deprecated
@非推奨
@todo
@your-attribute
```
sample code here.
```
*/
Create color guide カラーガイドを作成します。
/*
#colors
@primary #996600
@secondary #333
@color-name color-code
*/
npm install
npm test