If you're looking to create your very own sass compiler, there are a few different approaches you can take.
One option is to utilize "bundlers" such as Parcel.js or Webpack, where you'll need to implement your own logic for compiling the sass/scss files.
Alternatively, you could explore task runners like Gulp or Grunt, which operate in a similar manner to webpack. Many of these tools rely on third-party packages like node-sass (which is now deprecated) or dart sass.
If you prefer not to invest too much time in learning these options (webpack, gulp, grunt), you also have the option of writing your own compiler using node.js.
Personally, I find webpack to be my tool of choice. Just by creating my webpack.config.js
file once, I can easily use it across various projects. In most cases, all you need is a bit of javascript knowledge to get started.
I hope this information proves helpful!