Re: [Buildroot] [PATCH 2/2] package/sass: new package
Thomas Perale via buildroot <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Hello, In reply of: > On Fri Aug 7, 2026 at 1:55 PM CEST, Thomas Perale wrote: > > Hi Thomas, Alexis, > > > >> I am not super clear on what sass exactly does/is. But some time ago, > >> we dropped all JS libraries from Buildroot: > >> > >> https://lore.kernel.org/buildroot/[email protected]/ > >> > >> But sass doesn't seem to be one of those static JS libraries I guess > >> because it installs some executable host tool? > > > > If I remember correctly node-sass is build using node-gyp so I can make sense > > to have it in Buildroot because the node-sass version is closely related to the > > node version present in Buildroot. > > Just to make sure we are talking about the same thing, this package is > not introducing node-sass ([1]), which is deprecated, but sass ([2]) Ha yes indeed I was still thinking about that old node-sass package, I didn't know it was deprecated for good. Install should be easier with the new version. > > The question is how do you plan to use 'node-sass' once you have the executable. > > Correct me if I'm wrong but I guess the goal here is to use it in another > > Buildroot package that represent a "webapp" and you run 'node-sass' > > in the build step of that package and then place the generate css in the > > correct location ? > > Correct. To be exact, sass is not currently called directly by the > custom buildroot package for "webapp". "webapp" is a php project, using > composer to install and run "mini-asset" ([3]) which is a bundler > depending on uglify and sass binaries being present on host. > > > The correct way handle this (and minification) would probably be to use a > > dedicated JavaScript bundler and configure it to use node-sass and setup > > minification. This would probably yield smaller bundles and help handle > > versioning correctly for your webapp. > > This was also the thinking in dropping the JS libraries from Buildroot. > > > > If you have a `package.json` for the webapp with the node-sass dependency. Can > > you `npm install` the webapp dependencies using the buildroot 'npm' > > host-package without errors ? If that's the case I would say that it is > > probably a better solution. > > So in this case I've got no package.json, I only have a composer.json > requiring mini_asset, and mini_asset does not automatically pull those > dependencies. Mini-asset is configured through a .ini file, in which we > can use different "filters" (eg: Sass), and each filter has different > requirements, but it is up to the user to bring those dependencies on > host. One thing that I can check however, close to your suggestion, is > whether there is a different CSS "filter" that could be brought > automatically by composer and that generates something close to what > "webapp" is currently outputting. I see, thanks for the clarification. I didn't know about 'mini-asset'. I think your project can still define a package.json for the 'frontend' part with uglify and sass dev dependencies and make 'mini-assets' point to the 'node_modules' directory local "bin". But if you don't want to rely on 'package.json' or want vendoring then the best choice is probably adding the package to Buildroot indeed. Best regards, PERALE Thomas _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot