1.0.0 • Published 4 years ago

@nicjohnson/eleventy-plugin-sass v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

eleventy-plugin-sass

A plugin that adds sass support to Eleventy

Installation

Available on npm.

npm install eleventy-plugin-sass --save

Open up your Eleventy config file (probably .eleventy.js) and use addPlugin:

const pluginSass = require("eleventy-plugin-sass");
module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(pluginSass, sassPluginOptions);
};

Read more about Eleventy plugins.

Options

KeyTypeDefaultdescription
watchglob or array of globs['**/*.{scss,sass}', '!node_modules/**']The sass files you wish to compile (and watch when you serve)
sourcemapsBooleanfalseAdd sourcemaps next to your sass files
cleanCSSBooleantrueRuns the css trough cleanCSS
cleanCSSOptionsObjectN/AOptions to pass to cleanCSS
autoprefixerBooleantrueAdds browser specific prefixes if needed (adheres to BrowserList)

Disclaimer

This plugins wraps around internal Eleventy code, so if they changes their way of working it might stop working.

Contributing

Please do contribute, I am open to any changes. Just clone the repository and open a pull request.

License

MIT © Maarten Schroeven