PDA

View Full Version : Where do I put external components to be seen by build?



worthlutz
7 Nov 2012, 11:04 AM
​I have an ExtJs single page application built in Architect working.
I have some external components defined in "GeoExt".
My file structure looks like this:


~/Sencha/projects/MyApp
|
|-----app
|
|-----GeoExt
|
|-----index.html
|
...

My app.js looks like this:


Ext.Loader.setConfig({
enabled: true,
paths: [
Ext: ".",
GeoExt: "./GeoExt"
]
});

Ext.application({
requires: [
'GeoExt.panel.Map'
],
views: [
'MapContainer'
],
name: 'MyApp'
});

I can run the application from the index.html in "MyApp" and the loader can find all the source code and my application runs.

The problem occurs when I try:


sencha build app

I get an error saying: "Failed to find file for GeoExt.panel.Map".

If I change the directory structure and app.js as follows the build works.


~/Sencha/projects/MyApp
|
|-----app
| |
| |
| |---GeoExt
|
|
|-----index.html
|
...



Ext.Loader.setConfig({
enabled: true,
paths: [
Ext: ".",
GeoExt: "./app/GeoExt"
]
});

Ext.application({
requires: [
'GeoExt.panel.Map'
],
views: [
'MapContainer'
],
name: 'MyApp'
});


Why does the "build" command look in the app directory? Is this the correct location for these files to be located?

Worth