Opened 11 years ago

Closed 11 years ago

#6265 closed defect (wontfix)

Cannot create a custom build that includes dojo._base without making the filename dojo.js

Reported by: guest Owned by: James Burke
Priority: high Milestone:
Component: General Version: 1.0
Keywords: Cc: bob.remeika@…
Blocked By: Blocking:

Description

I am using dojo trunk (pre 1.1 release). I would like to create a custom build called drails-dojo.js which includes dojo._base and dojo.fx, but I am unable to do so without naming the file dojo.js.

Here is the build script that doesn't work:

dependencies = {

layers: [

{

For 0.9 you normally do not specify a dojo.js layer. Note that you do not need to specify dojo.js as a dependency for other layers -- it is always an implicit dependency. name: "drails-dojo.js", customBase: true, layerDependencies: [ ], dependencies: [

"dojo.fx"

]

}

],

prefixes: [ ]

}

Here is the buildscript that works (i.e. creates a shrinkwrapped file with dojo._base and dojo.fx included):

dependencies = {

layers: [

{

For 0.9 you normally do not specify a dojo.js layer. Note that you do not need to specify dojo.js as a dependency for other layers -- it is always an implicit dependency. name: "dojo.js", customBase: true, layerDependencies: [ ], dependencies: [

"dojo._base",

"dojo.fx"

]

}

],

prefixes: [ ]

}

Change History (3)

comment:1 Changed 11 years ago by guest

Ah... my contact info is bob.remeika@… or foobarfighter on IRC.

comment:2 Changed 11 years ago by Adam Peller

Owner: changed from anonymous to James Burke

comment:3 Changed 11 years ago by James Burke

Cc: bob.remeika@… added
Resolution: wontfix
Status: newclosed

I believe this is working as designed. I will explain the motivations behind it and we can compare to what you need.

Normally, dojo.js represents "Dojo Base", and normally that base is not exported to another file. We did not want to encourage users to make custom "Base" builds because we wanted the normal case to be: "if I pick up a dojo.js from the web, I know what it has in it -- the contents are a fixed quantity".

Now some folks want to add additional modules to what is in Dojo Base, so to allow that, the convention I used was that you would add them to the "dojo.js" layer. Additionally, for some very constrained environments, you may also want to modify what modules in dojo._base you actually want to include (the motivation for the customBase property).

Since I do not believe you want to change what modules from dojo._base are included, you do not need the customBase property. I think you should be able to get what you want by using this build profile:

dependencies = {
  layers: [
    {
      name: "dojo.js",
      dependencies: [
        "dojo.fx"
      ]
    }
  ],

  prefixes: [ ]
} 

and then, after the build is done, rename the dojo.js file to drails-dojo.js.

Otherwise, I'm not sure how we would support marking a layer as "this layer includes base" since any other layer implicitly depends on dojo.js (which includes base). It would require some extra special flags that cause extra code branches in the build tools, and it seems not worth the maintenance cost for this less common use case, particularly when specifying "dojo.js" and renaming the file after the build gets you the effect.

I'm going to close as wontfix, but feel free to re-open it with more information if you like.

Note: See TracTickets for help on using tickets.