Installation
If you want to integrate SassDoc in a build process but do not use Grunt, Gulp or Broccoli, you can still use SassDoc with nothing but Node.
Using raw data
If you are not interested in generating the documentation but only want to access the raw data, it is as easy as using the parse
method accepting a folder (of Sass/SCSS files) and returning a promise yielding documented items.
It’s up to you to do whatever you want with this!
Generating documentation
Or if you want to use SassDoc at its best and generate the whole documentation from Node, you can use the default function.
If you want to configure the destination directory, you can pass a custom dest
in the configuration object.
Synopsis
Both sassdoc
and sassdoc.parse
functions have the same synopsis:
@param {String} source
path to source or glob string/array;@param {Object} [configuration]
optional configuration object;@return {Promise}
.
Streaming
There is one more way you can use these functions; if you ommit the source
argument, you’ll get a transform stream, able to handle vinyl files. You can easily use it with vinyl-fs.
Note: that's why you don't need a plugin to use SassDoc with Gulp!
Find more examples and notes about the Stream API on the Gulp page.
About glob
The source
parameter above can be a simple source directory, but also
a glob expression or even array.