Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sassdoc

Package Overview
Dependencies
Maintainers
1
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sassdoc

Like JSDoc but for Sass files.

  • 1.0.0-rc.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.1K
increased by15.47%
Maintainers
1
Weekly downloads
 
Created
Source

SassDoc

SassDoc. Like JSDoc, but for Sass files.

Currently only work for .scss files. Also, inline comments are not parsed (//).

Example

Function/mixin

/**
 * Adds `$value` at `$index` in `$list`.
 *
 * @author Hugo Giraudel
 *
 * @ignore Documentation: http://sassylists.com/documentation/#insert-nth
 *
 * @requires is-true
 *
 * @param {List}   $list  - list to update
 * @param {Number} $index - index to add
 * @param {*}      $value - value to add
 *
 * @throws List index $index is not a number for `insert-nth`.
 * @throws List index $index must be a non-zero integer for `insert-nth`.
 *
 * @return {List | Null}
 */

@function insert-nth($list, $index, $value) {
  // ...
}

Variable

/**
 * Defines whether the lib should support legacy browsers (e.g. `IE 8`).
 * ---
 * @since 0.3.9
 * @todo Nothing. It's awesome.
 * @link https://github.com/HugoGiraudel/SassDoc SassDoc
 * @datatype Bool
 */
$legacy-support: true !global;

Preview

SassDoc

Installation

NPM

npm install -g sassdoc

Grunt

See grunt-sassdoc.

Usage

Command line

sassdoc <src> <dest> [options]

Arguments:

  1. <src> Path to your Sass folder.
  2. <dest> Path to the destination folder.

Options:

  • -h, --help: Bring help.
  • --version: Show version.
  • -v, --verbose: Run in verbose mode.
  • -c, --config: Path to JSON file containing variables to be passed to the view.

Node

var sassdoc = require('sassdoc');

sassdoc.parse(__dirname + '/sass').then(function (items) {
  console.log(items);
})

Documentation

See Wiki.

Pass extra variables to the view

With the -c or --config flag, you can set the path to a JSON file containing variables to be passed to the view so the latter is a little more customized than the default documentation.

Default path leads to view/view.json. You can update this file or make your own.

Allowed variables:

{
  "display": {
    "access": ["public", "private"],
    "alias": false,
    "watermark": true
   },

  "package": "../package.json"
}
  • (Array) display.access: access levels that should be displayed
  • (Boolean) display.alias: enable/disable display of alias items
  • (Boolean) display.watermark: mention to SassDoc in footer (be cool, leave it!)
  • (String|Object) package: path to a .json file (ideally your package.json) or directly an object

The package object (either direct or required) should ideally contain:

  • name
  • version
  • license
  • homepage
  • description

Credits

With huge contributions from:

Keywords

FAQs

Package last updated on 07 Jul 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc