hironichu / denosass

DenoSass is a complete nearly fully featured Sass compiler for Deno and Browser
https://deno.land/x/denosass
MIT License
44 stars 4 forks source link

Specify CLI glob patterns #16

Open Mqxx opened 1 year ago

Mqxx commented 1 year ago

Hey is it possible to specify glob patterns in the CLI? I would like to compile different sass files which are nested differently under a certain dist folder.

As an example, I have the following folders:

src/client/a.scss
src/client/generator/b.scss

And I would like to compile the following files from it:

dist/a.css
dist/generators/b.css

In ESBuild I can do it like this:

deno run -A https://deno.land/x/esbuild@v0.19.4/mod.js --outdir=dist/ ./src/client/**/index.ts

This generates a glob pattern which is used to store the files with the same nesting under dist. Is there something similar for this sass CLI?

Why would this be useful?

If you have several subpages in your project and do not want to bundle all style files into one file.

Thanks for considering. ~Mqx

hironichu commented 1 year ago

Hi,

I think it should be fairly easy to add.. however i really don't have time to update this now, i've started an entire rewrite of this module but i will continue this later next year

What u can do if you need CLI commands is implementing your own CLI tool with this library and call it locally without installing denosass

Mqxx commented 1 year ago

Thank you very much! Maybe you can get some inspiration from the parameters or the CLI interface of ESBuild.