2.9.0 • Published 6 years ago

docpad-plugin-sass v2.9.0

Weekly downloads
60
License
MIT
Repository
github
Last release
6 years ago

SASS/SCSS Plugin for DocPad with Compass support

Adds support for the SASS and SCSS CSS pre-processors to DocPad. It also supports the Compass framework.

This SASS/SCSS plugin uses the original ruby implementation, which requires installing ruby and the necessary gems. If you would like to use a native node implementation which would be faster (but no support for 3rd party ruby gems like compass etc) then we'd recommend using the nodesass plugin. More info here.

Convention: .css.(sass|scss). Make sure that you your files are located in documents (or render) folder as extensions-based rendering happens only inside this folder.

Install

  1. Install Ruby

  2. Install the SASS gem

  3. Optional: Install the Compass gem

  4. Install this plugin

    docpad install sass

Configure

For information on customising your plugin configuration you can refer to the DocPad FAQ

Sass and Scss Paths

We automatically detect the path to your sass and scss executables, however sometimes that doesn't work and you will get ENOENT errors. If our detection fails and you'll have to manually specify the path to your sass and scss executables with the sassPath and scssPath config options, more info here.

Compass Support

We automatically detect if you have compass installed, and if you do, then we'll use it. If our detection fails and you want to still use it, then set the compass option to true. If you have compass installed but don't want to use it then set the compass option to false.

Output Style

You can set the outputStyle option to any of the supported output styles. Those being nested, expanded, compact, and compressed. By default, we use the compressed mode for all environments, except the development mode where it is set to expanded.

Require Libraries

You can set the requireLibraries option to an array of extra ruby libraries you'd like to include before rendering your sass file. For instance, setting it to ['susy','compass-colors'] will include the Susy and Compass Colors plugins. By default, the value is set to null indicating we do not include any libaries.

Render Underscore Stylesheets

By default we prevent any SASS/SCSS stylesheets that filename starts with underscore character from being rendered and written to the output directory. This is to follow SASS/SCSS convention that such files are just intended to be included inside out 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.

Sourcemaps

If you want to use sourcemaps, set the sourcemap option to true.

Bundlr Support

If you want to use bundler you can set something like this in docpad.coffee:

	plugins:
		sass:
			scssPath: ['bundle','exec','scss']
			sassPath: ['bundle','exec','sass']

Troubleshooting

I get ERROR: Cannot load compass.

Install compass again using: gem install compass --pre

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.9.0

6 years ago

2.8.0

7 years ago

2.7.4

9 years ago

2.7.3

10 years ago

2.7.2

10 years ago

2.7.1

10 years ago

2.7.0

10 years ago

2.6.2

10 years ago

2.6.1

11 years ago

2.6.0

11 years ago

2.5.1

11 years ago

2.5.0

11 years ago

2.4.5

11 years ago

2.4.4

11 years ago

2.4.3

11 years ago

2.4.2

11 years ago

2.4.1

11 years ago

2.4.0

11 years ago

2.3.1

12 years ago

2.3.0

12 years ago

2.2.1

12 years ago

2.2.0

12 years ago

2.1.0

12 years ago

2.0.1

12 years ago

2.0.0

12 years ago

1.0.1

12 years ago

1.0.0

12 years ago