seven
seven

Reputation: 1624

wrighting many scss files into one minified css

I have four files:

And out of these files I need 3 - public/css/styles.css styles.css.map and styles.min.css

Where min.css is minified file and map is map file, can I do in in one script command using node sass? I'm using macOS

Many thanks!

Upvotes: 1

Views: 589

Answers (1)

Dan Mullin
Dan Mullin

Reputation: 4435

You can absolutely do that.

The only thing you need to do is name all of your SCSS files starting with an underscore.

Then you need to make style.scss, import the othe SCSS files into it, then compile it.

The underscore as the first character of the file name tells the compiler that the file is a partial and shouldn’t be compiled.

It gets compiled by being imported.

Assuming that you have style.scss in the same folder as the partial files, this is all you would need in style.scss

   @import "_bootstrap-grid";
   @import "_bootstrap-reboot";
   @import "_bootstrap-utilities";
   @import "_bootstrap";

Upvotes: 2

Related Questions