PDA

View Full Version : [OPEN] Sencha Cmd should support sandboxed packages



thorben
12 Oct 2012, 5:04 AM
Is it possible to use Sencha Cmd with a sandboxed build of Ext JS (e.g. ext-all-sandbox-dev.js)? I'm using Sencha Cmd 3.0.0.190.

I think a config option like jsduck's
--ext-namespaces=Ext,Ext4 would help us here. I'm mainly interested in a build of our custom classes, so it would be ok to have ext-all-sandbox.js included.

Is something like this going to be implemented or will I need to migrate my app to Ext JS 4 before using Cmd?

dongryphon
12 Oct 2012, 11:09 PM
We have discussed sandbox mode and there are a couple or so directions it could go.

I am curious to know more specifically what you are wanting to achieve. I assume you have a mixture of v3 and v4 classes? Are you wanting to produce a subset of the frameworks? And wrap the v4 subset in a sandbox...

thorben
19 Oct 2012, 12:34 AM
Yes, we've got a mixture of Ext 3 and Ext 4 classes. We are continually migrating to Ext 4, so the number of Ext 3 classes will eventually approach 0 ;).

What we want to achieve is a custom build of only the Ext 4 part of the app. In the final build, there will be 3 or 4 JS files

Ext JS 3 Framework (ext-all.js)
All our custom Ext JS 3 classes (this is generated using the current build process)
Ext JS 4 Framework + Ext JS 4 custom classes (this should be the output of Sencha Cmd)
So Cmd wouldn't need to care about the Ext JS 3 classes and their proper inclusion, but only accept "Ext4" as the Ext JS 4 namespace.

I imagine this might just be a minor tweak to the tool, but maybe sandboxing is more complicated internally?

dongryphon
19 Oct 2012, 9:06 AM
Cmd wouldn't need to care about the Ext JS 3 classes and their proper inclusion, but only accept "Ext4" as the Ext JS 4 namespace.

I imagine this might just be a minor tweak to the tool, but maybe sandboxing is more complicated internally?

Yeah that is the harder part - partitioning code that says one thing ("Ext") but needs to be understood as another ("Ext4") so that references from other code using the other name ("Ext4") link up properly. Then we need to wrap the sandbox around the Ext 4 code during the build.

It is all doable, but won't make in this release (3.0.0). Knowing that there are folks using/needing this support is really helpful though to decide when to pull the trigger on it.

I'm going to open this as a ticket so we can both track it.

Thanks for taking the time to explain what you were needing.

dongryphon
19 Oct 2012, 9:09 AM
I have opened a ticket in our bug tracker.