Styleguide plugin for Grunt
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tasks
test
.gitignore
.jshintrc
Gruntfile.js
LICENSE-MIT
README.md
index.html
package.json

README.md

grunt-sg

Grunt plugin to generate KSS style documentation

Getting Started

This plugin requires Grunt ~0.4.1

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-sg --save-dev

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

grunt.loadNpmTasks('grunt-sg');

The "sg" task

Overview

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

    sg:
    default_options:
      options:
        css:  'sass dir'
        data: '.yml file dir'
        html: 'partial dir'
        dest: 'target dir'
        project_css: 'name of css file for project'
        syntax: 'theme name'
        logo: 'logo file'
        js: 'js file or array of js files'

Required Options

  • CSS
  • HTML
  • Dest
  • Project CSS

Optional Options

  • JS
    • optional js that runs in styleguide
  • Logo
    • logo file for project
  • Syntax Theme
  • Data
    • The data option specifies the location of YAML files to load in datasets into the style guide. Handlebars files are then required instead of HTML files in the HTML dir.

Release History

(Nothing yet)