2.8.2 • Public • Published

    SCSS Plugin for DocPad using node-sass

    NPM version Dependency Status Build Status Gittip donate button

    Adds support for the SCSS CSS pre-processor to DocPad.

    The indented .sass syntax is not supported by node-sass, so it is not supported by this plugin.

    Convention: .css.scss


    docpad install nodesass

    Output Style

    outputStyle: 'nested'|'compressed'

    outputStyle is a String to determine how the final CSS should be rendered. Its value should be one of 'nested' or 'compressed'. 'expanded' and 'compact' are not currently supported by libsass.


    An object that you can use to pass options to node-sass

    Debug Info

    debugInfo: false|'normal'|'map'

    normal will print comments in the output css that indicates the source file name and line number. map will produce a sourcemap. Using either of these options instead of none will prevent you from being able to run any other process on the file (e.g., because debugInfo requires passing an actual file instead of stdin.

    Render Underscore Stylesheets

    renderUnderscoreStylesheets: false|true

    By default we prevent any SCSS stylesheets that filename starts with underscore character from being rendered and written to the output directory. This is to follow SCSS convention that such files are just intended to be included inside our stylesheets, and that they are not meant to be rendered by themselves. If you really want to, you can render the underscore stylesheets by setting the renderUnderscoreStylesheets option to true in your plugin's configuration.

    import-once example

    The node-sass-import-once module speeds up rendering by only importing files once. It also adds a few additional features including automatically importing from bower_components/.

    Install it with

    npm install --save node-sass-import-once

    And then configure it by setting the nodesass.options.importer to the import-once module:

                    importer: require('node-sass-import-once')
                        index: true # @import 'foo'; will load foo/_index.scss if foo is a folder 
                        css: true # @import 'bar'; will import bar.css 
                        bower: true # automatically search bower_components directory for imports 

    Bourbon example

    The node-bourbon module includes a simple and lightweight mixin library.

    Install it with

    npm install --save node-bourbon

    And then configure it by setting nodesass.options.includePaths to the includePaths provided by the module.

                    includePaths: require('node-bourbon').includePaths


    You can discover the history inside the file


    You can discover the contributing instructions inside the file


    Licensed under the incredibly permissive MIT License
    Copyright © 2012+ Bevry Pty Ltd
    Copyright © 2013+ Jimmy King


    npm i docpad-plugin-nodesass

    DownloadsWeekly Downloads






    Last publish


    • 10xlacroixdrinker