Socket
Socket
Sign inDemoInstall

grunt-kssgen

Package Overview
Dependencies
330
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-kssgen

KSS styleguide generator for Grunt.


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

grunt-kssgen

KSS styleguide generator for grunt. - Alternative to grunt-kss since it is dead

DEPRECATED: grunt-kss is back and much better maintained than this one so go use that instead please :)

Build Status NPM version Dependency Status

KSS styleguide generator for Grunt.

Getting Started

This plugin requires Grunt ~0.4.x

npm install grunt-kssgen --save-dev

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

grunt.loadNpmTasks('grunt-kssgen');

The "kssgen" config and an example task

Overview

To set up the kssgen config, add a section named kssgen to the data object passed into grunt.initConfig(), in your project's Gruntfile.

grunt.initConfig({
  kssgen: {
    options: {
      css: '/path/to/style.css',
    },
    dist: {
        files: {
          '/path/to/destdir': ['/path/to/sourcedir']
       }
    }
  }
});

Then, once you've added the config information above, you can add the kss build step to an existing task (not shown) or can create your own task. Here is an example task that you can create:

grunt.registerTask('styleguide', [
  // Add other tasks here if needed
  'kssgen'
  // Add other tasks here if needed
]);

Finally, you can call kssgen by running grunt styleguide (or directly by grunt kssgen).

Options

options.template

Type: String Default value: generator/handlebars/template (KSS default)

A string value that is used to use a custom template to build your styleguide.

options.helpers

Type: Array Default value: []

Specify the location of custom handlebars helpers; see http://bit.ly/kss-helpers

options.mask

Type: String Default value: null

A string value that is used to use a custom mask for detecting stylesheets.

options.custom

Type: String Default value: null

A string value that is used to use a custom property name when parsing KSS comments.

options.css

Type: String Default value: null

A string value that is used to use including a CSS stylesheet for your styleguide.

options.js

Type: String Default value: null

A string value that is used to use including a JavaScript file for your styleguide.

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.

Keywords

FAQs

Last updated on 21 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc