Movatterモバイル変換


[0]ホーム

URL:


StyleDocco

StyleDocco generates documentation and style guide documents from your stylesheets.

Stylesheet comments will be parsed throughMarkdown and displayed in a generated HTML document. You can write HTML code prefixed with 4 spaces or betweencode fences (```) in your comments, and StyleDocco shows a preview with the styles applied, and displays the example HTML code.

The previews are rendered in resizable iframes to make it easy to demonstrate responsive designs at different viewport sizes.

Suggestions, feature requests and bug reports are very welcome, either atGitHub or on Twitter (@jacobrask).

Installation

StyleDocco requiresNode.js. After installing Node.js, runnpm install -fg styledocco or clone this repository.

StyleDocco is free software, released under theMIT license.

Examples

Stylesheet

The following is the code you would write in your stylesheet, and theOutput is what you would see in the documentation.

/* Provides extra visual weight and identifies the primary action in a set of buttons.    <button>Primary</button>*/.btn.primary {    background: steelblue;    color: snow;    border: 2px outset steelblue;}

Output

Provides extra visual weight and identifies the primary action in a set of buttons.

For more in-depth examples, thedocs file is the documentation of the default StyleDocco CSS file, and anadditional example was generated from a modified file of the Twitter Bootstrap project.

Usage

styledocco [options] [INPUT]

Options

Usage examples

Generate documentation forMy Project in thedocs folder, from the files in thecss directory.

styledocco -n "My Project" css

Generate documentation forMy Project in themydocs folder, from source files in thestyles folder. Use the Less binary in~/bin/lessc.

styledocco -n "My Project" -o mydocs -s mydocs --preprocessor "~/bin/lessc" styles

Tips and tricks

Acknowledgements

A lot of the heavy lifting in StyleDocco is done by the excellentMarked module by Christopher Jeffrey. The originalDocco by Jeremy Ashkenas andKnyle Style Sheets have also been sources of inspiration for StyleDocco.

Change log

0.6.6

January 28, 2014

0.6.5

November 17, 2013

0.6.4

October 07, 2013

0.6.3

July 09, 2013

0.6.2

June 30, 2013

0.6.1

August 20, 2012

0.6.0

August 15, 2012

0.5.0

July 23, 2012


[8]ページ先頭

©2009-2025 Movatter.jp