[dojo-contributors] Module formats for the browser
kzyp at dojotoolkit.org
Thu Mar 25 13:31:18 EDT 2010
On 3/25/2010 11:21 AM, LiuCougar wrote:
> I agree with what james wrote at the end of this page:
> let me quote it here:
> I believe it is important to not force the use of a runtime server
> process to transform code:
> * It makes debugging weird, line numbers will be off vs. the
> source file since the server is injecting a function wrapper.
Its pretty easy to avoid line breaks in the wrapper code to avoid line
numbering offsets, so that's not really an issue.
> * It requires more gear. Front-end development should be possible
> with static files.
I am not suggesting that development can't be done with static files
except for actually developing the Dojo modules themselves (which is a
limited set of very capable devs). The first option I suggested for Dojo
users would be based on static files without any server intervention
(directly using the RequireJS API).
> IMO, it makes more sense to write a commonjs loader which understand
> requirejs formatted js file, and load dependencies sychronously:
> commonjs already has all the gears to do that, and we don't need to
> have a server functional wrapper in multiple languages, and it does
> not affect line number in commonjs environment either.
Actually, that's fine with me, I just didn't think potentially having
three loading mechanisms (dojo.require(), require(), and
require.define()) would be appreciated.
More information about the dojo-contributors