mcdave / grunt-ui-docs

Styleguide Generator for UI Components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grunt-ui-docs

Styleguide Generator for UI Components.

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-ui-docs --save-dev

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

grunt.loadNpmTasks('grunt-ui-docs');

The "ui_docs" task

Usage

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

grunt.initConfig({
  ui_docs: {
    mydocs: {
      title: 'css-docs', // documentation page title
      docsPath: 'docs/styleguide/', // path where you want to generate the styleguide
      docsAssetsPath: 'assets/', // relative to docsPath
      docsUIDocsAssetsPath: 'css-docs/', // relative to docsAssetsPath

      rawAssetsDir: 'assets/', // path to the assets you want to document

      js: {
          rawDir: 'js/', // relative to rawAssetsDir
          validExtensions: ['.js', '.coffe'],
          ignore: ['**/vendor/**', '**/vendor-setup/**']
      },
      css: {
          rawDir: 'scss/', // relative to rawAssetsDir
          validExtensions: ['.scss', '.css', '.sass', '.styl', '.less'],
          ignore: ['**/bourbon/**'],
          builtFilePath: 'dist/css/built.css', // path to the generated sass file(s)
          outputDir: 'css/' // relative to rawAssetsDir
      }
    }
  }
});

grunt-ui-docs is only a grunt adapter for ui-docs, check the complete list of configuration options and some examples about its usage.

Contributing

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.

Release History

(Nothing yet)

About

Styleguide Generator for UI Components.

License:MIT License


Languages

Language:JavaScript 100.0%