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

How can I compile multiple less files into one css file? #8

Open
zhaoyi0113 opened this issue Mar 16, 2018 · 1 comment
Open

How can I compile multiple less files into one css file? #8

zhaoyi0113 opened this issue Mar 16, 2018 · 1 comment

Comments

@zhaoyi0113
Copy link

I am using below scripts to compile less files:

"build-css": "node-less-chokidar src/scenes -o src/scenes",
"watch-css": "yarn run build-css && node-less-chokidar src/scenes -o src/scenes --watch --recursive",

I will compile each less file to one css file. I wonder whether there is a way for me to compile all less files into one big css file.

@sampi
Copy link
Owner

sampi commented Jul 18, 2018

@zhaoyi0113 You can solve this by importing all the other less files in a new file, and when you compile that, it will contain all the rules from every less file it imports.

Problem is that this module doesn't support "intelligent" crawling of the less file graph, so it won't detect changes in the file that imports every file. I'm thinking about an easy solution and will try to find some time to fix it. This solution only works for the build-css option.

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

2 participants