PDA

View Full Version : Change ext source folder location?



mgolus
18 Nov 2013, 8:08 AM
I have 5 applications that are using Ext JS 4.2.2. All 5 are in source control and all 5 contain an entire copy of the Ext JS source.

I want to be able to move the Ext JS source outside of the application folder and have all 5 applications share the same copy of the Ext JS source. I figured there would be an option in sencha.cfg file to change the ext source path, but am so far unable to find it.

I want my folder structure to look as folows:

Applications
|- Ext4.2.2
|- Application 1
|- Application 2
|- Application 3
|- etc....

scottmartin
18 Nov 2013, 8:28 AM
Have a look at .sencha/workspace/sencha.cfg



workspace.cmd.version=4.0.0.203
ext.dir=${workspace.dir}/ext

mgolus
18 Nov 2013, 4:03 PM
I ended up changing the ext.dir to the following:


ext.dir=${workspace.dir}/shared/lib/ext-4.2.2.1144

where the shared directory is a symlink to a directory that all projects will share. Performing a sencha app refresh with sencha cmd afterwards works just find. When I do an app build though, I get the following error:


[INF] [echo] Capture theme image to C:\[hidden app path]/build/temp/production/Vitals/slicer-temp/theme-capture.png
[INF] Capturing theme image
loading page C%3A/[hidden app path]/sass/example/theme.html
== Unhandled Error ==
ReferenceError: Can'''t find variable: Ext


file:///C:/[hidden app path]/sass/example/bootstrap.js:7


[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
[ERR] wn Source)

It appears that the app builds just fine, but it fails when generating the theme preview.

Looking at bootstrap.js, line 7 is the following:

Ext.Loader.addClassPathMappings({




Am I missing something?

mgolus
18 Nov 2013, 4:20 PM
Got it with some help from http://existdissolve.com/2012/11/virtual-directory-driven-extjs-4-development-part-second/

I needed to modify theme.html in the sass/example folder to point to the new path. After doing so, sencha app build works just fine.

lisdey89
1 Feb 2016, 7:02 AM
Hello I know this post is a little bit old, but I have that problem and I cannot fixed, I mean I change the ext.dir on my .sencha, but the build throws a lot of errors, when I search in the sass/example/theme.html I cannot find any dependency, I'm using Ext 6.0.0, Can anyone help me please... is really important...