JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
lib
.babelrc
.eslintrc
.gitignore
.npmignore
.travis.yml
LICENSE.md
README.md
package.json

README.md

sassdoc-loader

Travis Code climate bitHound bitHound npm

Webpack loader for sassdoc

Install

$ npm install @domjtalbot/sassdoc-loader

Usage

Documentation: using loaders

Within your webpack configuration, you'll need to add the sassdoc-loader to the list of modules. As the current version of webpack doesn't look for scoped packages, sassdoc-loader needs to be referenced with its full name.

module.exports = {
  // ...
  module: {
    postLoaders: [
      {
          test: /\.scss$/,
          loader: "@domjtalbot/sassdoc-loader",
          exclude: /node_modules/
      }
    ]
  }
  // ...
}

Configuration

module.exports = {
  // ...
  sassdoc: {
      // Output location
      // Default: Sassdoc default
      dest: String,

      // Configuration file
      // Default: null
      config: String,

      // Specify a theme
      // Default: null
      theme: String,

      // File/files to parse
      // Default: Webpack input
      entry: String,
  },
  // ...
}

Example webpack.config

module.exports = {
    entry: {
        app: './app.js'
    },
    output: {
        path: './public',
    },
    module: {
        preLoaders: [
            {
                test: [/\.scss$/],
                exclude: /(node_modules|bower_components)/,
                loader: 'scsslint'
            }
        ],
        loaders: [
            {
                test: [/\.scss$/],
                exclude: /(node_modules|bower_components)/,
                loader: 'sass'
            }
        ],
        postLoaders: [
            {
                test: [/\.scss$/],
                exclude: /(node_modules|bower_components)/,
                loader: '@domjtalbot/sassdoc-loader'
            }
        ]
    }
    sassdoc: {
        entry: './assets/scss/*.scss .assets/scss/**/*.scss',
        config: '.sassdoc.yml'
    },
};