Opened 11 years ago

Closed 8 years ago

#7077 closed defect (worksforme)

Build in GFX requireIf code into layer file

Reported by: guest Owned by: Rawld Gill
Priority: low Milestone: future
Component: BuildSystem Version: 1.1.1
Keywords: gfx, build needsreview Cc: alex@…, jayant.b.sai@…, Eugene Lazutkin
Blocked By: Blocking:

Description

I have a custom build 'mybuild.js' and use GFX. When my application initializes, it has to go back to the server to get VML/SVG require files. It would be great if mybuild.js could already include the VML & SVG code within a conditional block.

Change History (6)

comment:1 Changed 11 years ago by dylan

Milestone: future

comment:2 Changed 11 years ago by James Burke

Owner: changed from anonymous to James Burke

Talking more with Jayant about this, here is what might work:

1) Allow definining a layer.forceRequireIf = [

"dojox.gfx.svg", "dojox.gfx.vml"

]

2) When evaluating dojo.requireIf calls, if the requireIf condition matches, or if the module name is in the forceRequireIf list, go ahead and include it in the build.

3) Wrap the module in a if (requireIfExpression) {} so that the code only executes at runtime if that condition is met.

Once this works, need to document this somehow so others know about it.

comment:3 Changed 11 years ago by Eugene Lazutkin

Cc: Eugene Lazutkin added

comment:4 Changed 8 years ago by bill

Component: GeneralBuildSystem
Owner: changed from James Burke to Rawld Gill
Status: newassigned

comment:5 Changed 8 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

i believe this functionality can be achieved via dojo/has or some other means now.

i say this could be closed.

comment:6 Changed 8 years ago by bill

Resolution: worksforme
Status: assignedclosed

OK, let's close it.

It sounds like a bad idea in general to bloat your build with both VML and SVG just to avoid one extra network request.

But, if one did want to do it, it seems to me (also) that you could just add "dojox/gfx/svg" etc. to your list of required modules (the modules to go into your mybuild.js layer).

Note: See TracTickets for help on using tickets.