2.12.0 • Published 2 years ago

docpad-plugin-nodesass v2.12.0

Weekly downloads
10
License
MIT
Repository
github
Last release
2 years ago

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

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.

Options

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. FILE.css.scss.eco), 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:

    plugins:
        nodesass:
            options:
                importer: require('node-sass-import-once')
                importOnce:
                    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.

    plugins:
        nodesass:
            options:
                includePaths: require('node-bourbon').includePaths

Install this DocPad plugin by entering docpad install nodesass into your terminal.

Discover the release history by heading on over to the HISTORY.md file.

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

These amazing people are maintaining this project:

No sponsors yet! Will you be the first?

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Unless stated otherwise all works are:

and licensed under:

2.12.0

2 years ago

2.8.2

8 years ago

2.8.1

9 years ago

2.8.0

9 years ago

2.7.1

9 years ago

2.7.0

9 years ago

2.6.0

9 years ago

2.5.1

9 years ago

2.5.0

9 years ago

2.4.4

10 years ago

2.4.3

10 years ago

2.4.2

10 years ago

2.4.1

10 years ago

2.4.0

10 years ago

2.3.0

10 years ago

2.2.1

10 years ago

2.2.0

10 years ago

2.1.1

11 years ago

2.1.0

11 years ago

2.0.2

11 years ago

2.0.1

11 years ago

2.0.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago