Runs DSS over a set of files and builds a JSON file as output.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Runs DSS over a set of files and builds a JSON file as output.

Use grunt-dss if you want a built in templating option to build documentation. This plugin is inteneded to be used with any templating option you'd like. See jekyll-dss for any example using Jekyll.

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-dss2json --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


The "dss2json" task


In your project's Gruntfile, add a section named dss2json to the data object passed into grunt.initConfig().

Add JSDoc style comments to your CSS (or Sass or Less or Stylus) files to document style blocks. Then run grunt dss2json to generate a JSON file with all of the parsed data.


	* @name Test
	* @description This is a test
	* @markup
	* <div>Test</div>
body { color: #c0ffee; }



Type: Array or Object Default value: []

Files to parse. Using Grunt default files syntax. More about that on Gruntjs wiki.

Usage Examples

  dss2json: {
    files: {
      "path/to/output.json": ["css/**.{css,scss,less,stylus}"]


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.