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).
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.
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.