
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
styledocco
Advanced tools
_______ __ __ _____
| __| |_.--.--| |-----.| \-----.----.----.-----.
|__ | _| | | | -__|| -- | _ | __| __| _ |
|_______|____|___ |__|_____||_____/_____|____|____|_____|
|_____|
StyleDocco generates documentation and style guide documents from your stylesheets.
Stylesheet comments will be parsed through Markdown and displayed in a generated HTML document. You can write code examples inside GitHub Markdown code fences (```
) or prefixed with 4 spaces in your comments, and StyleDocco both renders the HTML and shows the code example.
The document is automatically split into new sections when it encounters a level 1 or 2 heading. Read more about the heading syntax in the Markdown guide. Only comments at the beginning of new lines are included, so to exclude something from the style guide, put some whitespace before the comment.
An important philosophy of StyleDocco is to introduce as little custom syntax as possible, and to maintain the documentation readable and usable even without StyleDocco.
If your project includes a README
file, it will be used as the base for an index.html
. StyleDocco will also add some default styles to your documentation, but they are easy to modify to make it fit with your project.
StyleDocco will automatically compile any SASS, SCSS, Less or Stylus code before it is applied to the page. You can also enter a custom preprocessor command if you want to supply extra options to the preprocessor.
StyleDocco requires Node.js.
npm install -g styledocco
or check out this repository.
StyleDocco is free software, released under the MIT license.
styledocco [options] [INPUT]
--name
, -n
Name of the project (required)--out
, -o
Output directory (default: "docs")--tmpl
Directory for custom docs.jade
and docs.css
(optional)--overwrite
Overwrite existing files (docs.css
) in target directory. (default: false)--preprocessor
Custom preprocessor command. (optional) (ex: --preprocessor "scss --load-path=deps/"
)Generate documentation for My Project in the docs
folder, from the files in the css
directory.
styledocco -n "My Project" css
Generate documentation for My Project in the mydocs
folder, from source files in the styles
folder. Use the Less binary in ~/bin/lessc
.
styledocco -n "My Project" -o mydocs --preprocessor "~/bin/lessc --include-path=../includes" styles
/*
<button class="btn primary">Primary</button>
Provides extra visual weight and identifies the primary action in a set of buttons. */
.btn.primary {
background: blue;
color: white;
}
Would display the description, a button as well as the example HTML code. The CSS will be included in the style
element of the document.
See the examples
folder for more in-depth examples.
A lot of the heavy lifting in StyleDocco is done by the excellent Marked module by Christopher Jeffrey. The original Docco by Jeremy Ashkenas and Docco Husky by Mike Brevoort were also of great help to this project. Knyle Style Sheets is a similar project written in Ruby, and has also been an inspiration to StyleDocco.
FAQs
Generate documentation and style guides with design patterns from stylesheets.
The npm package styledocco receives a total of 4,098 weekly downloads. As such, styledocco popularity was classified as popular.
We found that styledocco demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.