Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node-sass includePaths in command line?

So I'm setting up a new project, and I want to use Bourbon for scss via npm. This requires doing npm install bourbon, and then somehow piping the path into node-sass at time of compilation.

My current sass script looks like this:

node-sass --output-style compressed -o build/css/ scss/

And the Bourbon docs indicate that I need to do something like:

require("bourbon").includePaths

But how do I do this via the command line?

like image 927
j_d Avatar asked Jun 17 '16 09:06

j_d


People also ask

How do I know if Sass is installed in CMD?

The “-v” command checks the version of SASS you have installed. If you don't have it installed, it will come back as not installed.

How do I check Sass version?

To check the version, run the command: sass –version. The latest version is 1.49.


1 Answers

You need to add bourbon stylesheets with the include-path option in the command line like this (multiline for readability, needs to be on single line in package.json):

node-sass 
--include-path node_modules/bourbon/app/assets/stylesheets/  
--output-style compressed -o build/css/ scss/
like image 92
MGR Avatar answered Sep 28 '22 08:09

MGR