brewer.js icon indicating copy to clipboard operation
brewer.js copied to clipboard

Problem with resolving LESS importation tree

Open matehat opened this issue 13 years ago • 2 comments

This bug concerns the automated actualization of compiled files from a set of LESS files referencing each other. It was noticed that if fileA "imports" fileB using the normal @import LESS directive, the output is correct, but the brewer make and brewer watch commands don't associate changes from fileB to the need to recompile fileA, which works nicely for other parsers.

The problem is indeed that we detect the importation tree and verify modification time based on our own # import directive, made up for coffeescript/javascript/etc family (because they don't have this concept; the closest is commonjs modules). There is no workaround, unless we change the way imports are handled for CSS-like languages.

matehat avatar Feb 18 '12 17:02 matehat

The problem can be resolved if we don't consider @import to mean an importation in the sense of bundling, but to still depend on the imported files in the sense of file invalidation. This should contrast with the upcoming way of handling @import directives in CSS files, in 0.4: importation for bundling and for invalidation.

matehat avatar Feb 21 '12 06:02 matehat

My team is dealing with this issue daily. Is there any chance there's a workaround I can use in the meantime? I'd be okay with using an alternative syntax for the stylesheet bundle. Is there some way to use the #import command for less/css?

Thanks for your time and help! Brewer is excellent.

zslayton avatar Nov 29 '12 20:11 zslayton