Skip to content

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

Comments

I dislike the comment "require" directives way of specifying dependencies. They should be real JavaScript function calls, which could either be analyzed ahead of time and stripped, like Sprockets, or used with a JavaScript loader system at runtime. This would remove the CGI/Ruby dependency and make the whole system more reusable (for example, server side, where concatenation isn't necessary/desired).

Respectfully: no, it shouldn't. :) There's plenty of libraries that do this already. Sprockets solves a different problem.

Can you elaborate? I assumed the problem was "JavaScript dependency management and concatenation".

What I described is essentially what we do in Objective-J. During development it just resolves the dependencies at runtime, but when you deploy you can flatten them into one big file.

AboutSource Built by g1lg1l

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