0.4.2 • Published 7 years ago

kss-loader v0.4.2

Weekly downloads
41
License
MIT
Repository
github
Last release
7 years ago

kss-loader

travis build CircleCI codecov coverage npm npm Greenkeeper badge

Webpack loader for kss-node

Installation

Install the plugin with npm:

npm install kss-loader --save-dev

Usage

Within your webpack configuration, you'll need to add the kss-loader to the list of modules.

module.exports = {
  // ...
  module: {
    rules: [{
      test: /\.scss$/,
      exclude: /(node_modules|bower_components)/,
      use: {
        loader: 'kss-loader',
        options: {
          title: 'KSS Example',
          mask: '*.scss|*.css',
          placeholder: '[modifier class]',
          source: './scss/',
          destination: './docs/',
          homepage: './../README.md'
        }
      }
    }]
  }
  // ...
}

Options

NameDefaultTypeDescription
sourcestringSource directory to recursively parse for KSS comments,homepage, and markup (relative to webpack.config.js file)
destination"styleguide"stringDestination directory of style guide (relative to webpack.config.js file)
mask"*.css|*.less|*.sass|*.scss|*.styl|*.stylus"stringUse a mask for detecting files containing KSS comments
configstringLoad the kss options from a json file
builder"builder/handlebars"stringUse the specified builder when building your style guide
cssarrayURL of a CSS file to include in the style guide (relative to the generated style guide)
jsarrayURL of a JavaScript file to include in the style guide (relative to the generated style guide)
customstringProcess a custom property name when parsing KSS comments
extendstringLocation of modules to extend the templating system; see http://bit.ly/kss-wiki
homepage"homepage.md"stringFile name of the homepage's Markdown file (relative to source)
markupfalsebooleanRender "markup" templates to HTML with the placeholder text
placeholder"modifier class"stringPlaceholder text to use for modifier classes
nav-depth3numberLimit the navigation to the depth specified
title"KSS Style Guide"stringTitle of the style guide

For more options, see kss-node cli options.

Example

Check out the example directory for a simple KSS style guide example.

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.9

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago