Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/docpad/docpad-plugin-nodesass
Adds support for the SCSS CSS pre-processor to DocPad, using node-sass
https://github.com/docpad/docpad-plugin-nodesass
docpad-plugin
Last synced: about 2 months ago
JSON representation
Adds support for the SCSS CSS pre-processor to DocPad, using node-sass
- Host: GitHub
- URL: https://github.com/docpad/docpad-plugin-nodesass
- Owner: docpad
- License: other
- Created: 2013-07-08T17:15:43.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-01-07T07:39:56.000Z (almost 1 year ago)
- Last Synced: 2024-10-20T05:19:59.266Z (3 months ago)
- Topics: docpad-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/docpad-plugin-nodesass
- Size: 484 KB
- Stars: 8
- Watchers: 14
- Forks: 13
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
docpad-plugin-nodesass
> Adds support for the [SCSS](http://sass-lang.com/) CSS pre-processor to [DocPad](https://docpad.org).
The indented `.sass` syntax is not supported by [node-sass](https://github.com/andrew/node-sass), so it is not supported by this plugin.
Convention: `.css.scss`
### Output Style
```coffeescript
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](https://github.com/hcatlin/libsass).
### Options
An object that you can use to [pass options to node-sass](https://github.com/sass/node-sass#options)
### Debug Info
```coffeescript
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
```coffeescript
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](https://www.npmjs.com/package/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
```bash
npm install --save node-sass-import-once
```And then configure it by setting the `nodesass.options.importer` to the import-once module:
```coffee
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](https://github.com/lacroixdesign/node-bourbon) module includes a simple and lightweight mixin library.
Install it with
```bash
npm install --save node-bourbon
```And then configure it by setting `nodesass.options.includePaths` to the `includePaths` provided by the module.
```coffee
plugins:
nodesass:
options:
includePaths: require('node-bourbon').includePaths
```Install
Install this DocPad plugin by entering
docpad install nodesass
into your terminal.History
Discover the release history by heading on over to the
HISTORY.md
file.Contribute
Discover how you can contribute by heading on over to the
CONTRIBUTING.md
file.Backers
Maintainers
These amazing people are maintaining this project:
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
-
Benjamin Lupton — view contributions -
Chris Hale — view contributions -
Greenkeeper — view contributions -
Jan Kolkmeier — view contributions -
Jimmy King — view contributions -
Johannes Troeger — view contributions -
Merrick Christensen — view contributions -
Michael Barlock — view contributions -
Michael Duane Mooring — view contributions -
Nathan Friedly — view contributions -
Thuong Dinh — view contributions -
x6a68 — view contributions
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
License
Unless stated otherwise all works are:
- Copyright © Jimmy King
and licensed under: