Easily convert sass to css

Usage no npm install needed!

<script type="module">
  import easySass from 'https://cdn.skypack.dev/easy-sass';


What and why

This is made to combine some of the sass and css node tools into one. You can use this to turn your sass into css and then minify it.


If you're really new and don't know how to use this: in your project directory, make a sasstocss.js file. Then add the following to it (replacing the paths with your own ones):

const easysass = require("easy-sass");

  src: [
  destFolder: "./your/destinationFolder/forcssfiles/"
}).then(console.log("All of the files are done now, and code inside .then() will only be run now."));

Then make sure that you've already at least once ran npm i easy-sass, or that but --save or --save-dev at the end. Then run it by typing in your console "node sasstocss.js".

Arguments to pass in

Name Type Value
src Required array Source sass files. Can be just an array of one if you don't need multiple ones.
destFolder Required string The folder where your css files will be placed. The filename will be the same as your sass file's one, but with .css at the end instead of .scss or .sass
release Boolean If set to true your css files will also be minimized.
# Contributing
Please keep it so that the defaults are sensible. Only require the paths to be passed in. Do not break the way that this works now. You can add to it, but make it optional.
Give variables and functions sensible names, and if your code gets complex at all, please comment on it. I will reject changes if I don't understand what's going on and there isn't any comments.

'Things that would be nice to add' - list

  • Sourcemap support (Do not turn on by default)
  • Linting (Do not fail by default at least.)
  • Command line usage

If you know how to impliment any of those, do feel free to send your changes in.