Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example comparable to how sass works? #210

Closed
brycewray opened this issue Mar 17, 2023 · 4 comments
Closed

Example comparable to how sass works? #210

brycewray opened this issue Mar 17, 2023 · 4 comments

Comments

@brycewray
Copy link

I apologize in advance if this is a dumb question, but I have searched in vain for the answer. Given that this is supposed to be an alternative to the sass package, I’m unclear on how it can be used in a similar way. For example, once the sass package is installed, a package.json script can use it; e.g.,

"style-exe:sass": "sass --no-source-map assets/scss:assets/css"

. . . but I can find no analogous documentation, or references within any of the existing issues, to how one uses embedded-host-node similarly. I understand that its purpose is to download the appropriate binary but, beyond that, it’s not clear how one should proceed, so I would greatly appreciate any guidance on this score. (If it matters, this would be for use with a Hugo project that already uses npm packages and, thus, package.json scripts — but more general information would also be helpful.)

@nex3
Copy link
Contributor

nex3 commented Mar 20, 2023

This package doesn't (currently) provide a CLI executable. sass/dart-sass#1889 is tracking the possibility of adding one, but for now this only supports the JS API for using Sass.

@nex3 nex3 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2023
@dikaso
Copy link

dikaso commented Jul 29, 2024

sass/dart-sass#1889 is closed. Do we have any info on how to use it as cli?

@nex3
Copy link
Contributor

nex3 commented Jul 29, 2024

Fantastic question. We set "bin": {"sass": "./dart-sass/sass"} in the package.json for the individual platform packages, but apparently this is not picked up by npm exec as expected even when running npx sass-embedded-${os}-${arch}. I'll look into why that is.

In the meantime, you can find the executable manually in node_modules/sass-embedded-${os}-${arch}/dart-sass/sass.

@nex3
Copy link
Contributor

nex3 commented Jul 30, 2024

#313 should make this much simpler (except on Windows under cmd.exe or PowerShell, which are blocked by npm/cmd-shim#152). Once that lands, you'll be able to run npx sass, or just sass if you've installed the package with npm install -g sass-embedded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants