Introduction

npm install --save-dev broccoli-sassdoc

Usage

var sassdoc = require('broccoli-sassdoc');
var docs = sassdoc(tree, options);

… where:

  • tree: A Broccoli tree or a directory path as a string.
  • options: An object of options to pass to SassDoc.

Options

Any specified option will be passed through directly to SassDoc, thus you can specify any option that SassDoc supports. Refer to:

Heads up: if options or a config file are passed it will prevail over .sassdocrc if any. You should really manage your options in one place.

Destination

Heads up: Due to the way Broccoli operates, you have to specify the destination folder manually. broccoli build path/to/dest. In consequences, the dest option from SassDoc is disabled.

Examples

Bare minimum, using defaults.

var docs = sassdoc('path/to/source');

Example with external an configuration file.

var docs = sassdoc('path/to/source', {
config: 'path/to/config.json',
});

Example with some options passed in.

// Tip: you're not required to pass every options,
// just set the one you need.
var docs = sassdoc('path/to/source', options: {
verbose: true,
display: {
access: ['public', 'private'],
alias: true,
watermark: true,
},
groups: {
slug: 'Title',
helpers: 'Helpers',
hacks: 'Dirty Hacks & Fixes',
'undefined': 'Ungrouped',
},
basePath: 'https://github.com/SassDoc/broccoli-sassdoc',
});