Search code examples
csssasscompiler-construction

Sccs/Sass compiling to CSS


does someone knows how to program a compiler that compiles SCCS/SASS to CSS without a VSCode extention? Can someone explain which language you need and maybe a basic concept? Thanks!


Solution

  • There are several ways to create your "own" sass compiler.
    You could use "bundlers" like Parcel.js or Webpack where you have to write your own logic, to compile the sass/scss files.
    Another way which could be similar like webpack is to use task runners like Gulp or Grunt. Most of them will rely on some third party packages like node-sass (it is deprecated now) or dart sass.
    Of course if you don't want to burn much time to learn one of these options (webpack, gulp, grunt) you could always write your own compiler with node.js

    For me, I prefer to use webpack . Just have to write my webpack.config.js file once and could use it almost everywhere in my pet projects.
    For most of these you will only need some javascript and you are good to go. Hope it helps!