Skip to main content

Install

In order to begin using any Sass Fairy module, its package must first be installed and your Sass compiler must be configured to use it properly.

This example shows how to install the list module.

npm install @sass-fairy/list@next

Next, configure the compiler to include the node_modules folder and to use the functions provided by the package. That should look something like this:

const sass = require('sass');
const ListFunctions = require('@sass-fairy/list');

sass.compile(filePath, {
loadPaths: ['node_modules'],
functions: {
...ListFunctions
}
});

Finally, it is ready to use just like any other Sass module.

@use '@sass-fairy/list';