Skip to content

Comment on Sprockets: JavaScript dependency management and concatenation (SvN)

Comments

Sounds like great stuff! I think we shouldn't limit ourselves to source code directory structure so much and this is a step in the right direction.

One problem I foresee with this approach is that it could make debugging harder, if you have to look at the "concatenated" javascript file in production to make sense of what code's included and not, it's harder to know what comes from where than if you just included the original source code files.

One solution would be to have a way to switch between "concatenated" and "normal" modes easily (maybe it's already possible, I don't know), so that normal development would be unimpeded. But you'd have to resort to the big concatenated file for debugging in production.

Another solution would be to somehow preserve the information about what comes from where, so that via a browser plugin you could browse the concatenated file as if it were the original modular files.

Lately I'm getting really interested in ways to preserve information about "what comes from where" so that you could point to something in a generated output and ask the system to explain the sum of all inputs and considerations (decisions, transformations) that resulted in that "atom" being generated in the output through the various "semantic levels". You usually generate a low-level representation from a higher-level representation and it can be useful to proceed carefully from one transformation to the next so that you preserve meaningful semantic information about intermediate stages.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.