npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

frontnote

v2.0.5

Published

StyleGuide Generator FrontNote

Downloads

715

Readme

FrontNote

GitHub version Build Status Code Climate

FrontNote

StyleGuide Generator Node.jsを使ったスタイルガイドジェネレーター

Usage - 使い方

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
});

Plugins - プラグイン

API

FrontNote(options);

options

Type: Object Default value: {}

Option. Please see options section for more information.

オプション 詳しくはオプションの項をご覧ください。

note.render(files,callback);

files

@Required
Type: String | Array
Pattern to be matched.
Please see the minimatch documentation for more details.

マッチさせたいパターン
詳しくはminimatchのドキュメントをご覧ください。

callback

Type: Function Default value: null

Call this function when generated style guide.

スタイルガイドが生成された後に実行するされる関数

Option - オプション

options.title

Type: String Default value: StyleGuide

Title of StyleGuide.

スタイルガイドのタイトル

ログを詳細に表示します

options.overview

Type: String Default value: __dirname + '/styleguide.md''

StyleGuide overview file's path. Overview file is required Markdown format.

index.htmlに表示するオーバービューファイル(マークダウン)のパス
オーバービューファイルはマークダウン形式です。

options.template

Type: String Default value: __dirname + '/template''

StyleGuide template path.

スタイルガイドのテンプレートパス

options.includeAssetPath

Type: String Default value: assets/**/*

The path of the file you want to copy the generated directory.

生成されたディレクトリにコピーしたいファイルパス

options.out

Type: String Default value: ./frontnote

Directory in which to generate a style guide.

options.css

Type: String|Array Default value: ./style.css

Path of CSS that you want to read in HTML. In the array or string.

HTMLに読み込みたいCSSのパス。文字列または配列で指定します。

options.script

Type: String|Array Default value: null

Path of JS that you want to read in HTML. In the array or string.

HTMLに読み込みたいJSのパス。文字列または配列で指定します。

options.clean

Type: Boolean Default value: false

Clean files and folder from options.out directory.

出力先ディレクトリとファイルを削除します。

options.verbose

Type: Boolean Default value: false

Display a detailed log

ログを詳細に表示します

options.params

Type: Object Default value: {}

Custom variables for using ejs templates.

ejsテンプレート内で使う任意の変数を定義できます。

Template - テンプレート

frontnote-template

テンプレートはfrontnote-templateを参考にカスタマイズできます

Comment Style - コメントの書き方

File overview - ファイル概要

Only 1 comment block in a file.
1ファイルに1つき1ブロックだけ記述できます。

/*
#overview
fileoverview title

fileoverview comment
*/

Section - セクション

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.
```
*/

Color Pallet - カラーパレット

Create color guide カラーガイドを作成します。

/*
#colors

@primary #996600
@secondary #333
@color-name color-code
*/

Test

npm install
npm test