Re: [Buildroot] [PATCH 2/2] package/sass: new package
Alexis Lothoré via buildroot <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Hello Thomas, Thomas, On Mon Aug 10, 2026 at 11:04 PM CEST, Thomas Perale wrote: > Hello, > > In reply of: >> On Fri Aug 7, 2026 at 1:55 PM CEST, Thomas Perale wrote: [...] >> 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. A small update on this: While exploring the option of making the webapp build system manage the dependencies installation (as Thomas Perale suggested), we found out that we may be able to handle those directly with composer, without having to add a package.json: there seems to be alternatives to sass and uglifyjs that are packaged directly as php modules (and so, that can be pulled directly with composer install) and that mini-asset supports: - sass -> scssphp - uglifyjs -> jshrink Some quick PoC validated that we are able to generate correctly the frontend assets with those alternatives, so we will likely go this way and get rid of those custom npm host packages. If we ever happen to finally need those npm modules, Thomas Petazzoni also hinted me about the npm fetcher mechanism implemented in bitbake ([1]) that could be inspired from and ported to buildroot. This series can then be dropped; thanks anyway for taking time to review it, and for the discussions/suggestions ! Alexis [1] https://docs.yoctoproject.org/bitbake/2.18/bitbake-user-manual/bitbake-user-manual-fetching.html#npm-fetcher-npm > Best regards, > PERALE Thomas -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot