alloc / cush

WIP module bundler 🎁
MIT License
0 stars 0 forks source link

css: support sass, less, stylus #20

Open aleclarson opened 6 years ago

aleclarson commented 6 years ago

Currently, only .scss modules are supported, and the entire bundle is processed as SCSS when at least one .scss module exists.

Battle plan

If the entry module is not plain CSS, the compiled bundle will be processed as that language, and other languages are processed at the package level (so packages cannot mix SCSS and LESS, for example).

Otherwise, all languages are processed at the package level.

Side note: SASS and SCSS can be mixed in the same package, since they share the same processor.

aleclarson commented 6 years ago

Minor change: When a non-CSS module imports a module of the same extension, they will be processed together, even if not in the same package.

Also: If the root package (which contains the main module) has node-scss as a dev dependency, the entire bundle is compiled as SCSS. This will work with Stylus and LESS, too.