Closed shawninder closed 8 years ago
For javascript, in order to re-use the parsing already done by browserify, we would need to make a plugin, not a transform. I think I'm going to try both a plugin and transform and measure whether it's worth the sacrifice or not... Hopefully it's not that slow to re-parse, considering we don't do a full parse, just enough to get the require
s (using detective
)
JS part is done (using detective
)
Next up is the CSS part. I will probably create a css-detective
using postcss to keep things consistent..
But finding comments with regular expressions can be rather difficult. Consider the following corner cases:
Indeed it may even be impossible since javascript is not a regular language (nor is CSS).
I think we're going to have to use parsers for this instead. I just hope it won't make things too slow...