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

switch from sass to less (css) #167

Merged
merged 1 commit into from Aug 28, 2020
Merged

switch from sass to less (css) #167

merged 1 commit into from Aug 28, 2020

Conversation

hmaurer
Copy link
Contributor

@hmaurer hmaurer commented Aug 28, 2020

This PR switches the CSS preprocessor from https://sass-lang.com/ to http://lesscss.org/. This resolves an issue with node-sass on OS X (#157) and will facilitate integration with NixOS/nixos-homepage#506.

I'd appreciate a careful review of the Nix side of these changes. I removed a chunk of code from default.nix which appeared to be customising node-sass, but I don't know if something similar is necessary for less. Everything appears to work as expected, though.

PS: question to @garbas (or another contributor): how do you generate yarn.lock after making changes to package.json? Yarn does not seem to have a flag to generate a lock file only, so I've been running yarn install && rm -r node_modules. Is there another way?

If you don't already have a better solution in place we could add a command to the nix shell using npm --package-lock-only and https://github.com/imsnif/synp, c.f. https://stackoverflow.com/a/58609139/2362799

@garbas
Copy link
Member

garbas commented Aug 28, 2020

@hmaurer we kinda have to use yarn since only yarn2nix exists. there is also npm2nix but that requires us to generate nix file and not just reading the lock file. We can switch once situation changes there.

There is also yarn generate-lock-entry, but yarn install also works.

I tested this locally and works fine!

@garbas garbas merged commit 8175e2b into NixOS:master Aug 28, 2020
@hmaurer
Copy link
Contributor Author

hmaurer commented Aug 28, 2020

@garbas ah! just to be clear: I wasn't suggesting switching to NPM. yarn generate-lock-entry does not, as far as I know, generate a yarn.lock. What I was suggesting is the solution described in the stackoverflow answer I linked: use npm install --package-lock-only to generate a package-lock.json file, then convert it to yarn.lock via synp. But perhaps that's overthinking it; yarn install && rm -r node_modules works.

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

Successfully merging this pull request may close these issues.

None yet

2 participants