lundi 15 décembre 2014

How can I use a production build without the index.html?

(Sorry for this perhaps trivial question.)

As an SA-user just coming from Ext 4.2 I am having trouble understanding Ext 5.x and the results produced by Cmd.

In an Ext 4.2 project I get an "all-classes.js" file that I simply load in my HTML page generated by PHP and CodeIgniter.

An Ext 5.x project generates "app.js", "app.json" and "microloader.js" and I have been trying hard to get these files loaded correctly to launch my project. (I have disabled the creation of a index.html in Sencha Cmd when building as I want to dynamically create the HTML to put localizations and configs into the page).

I guess my problem is that I refer to the page using the URL:


Code:



http://ift.tt/1wARqHP

where index.php is the CodeIgniter router. For tidiness I keep the files for the Ext JS UI under a separate directory. In the page CodeIgniter prepares I have a simple script tag including the microloader.js.


Code:



<script id="microloader" type="text/javascript" src="<?php echo base_url('assets/ui/microloader.js'); ?>"></script>

The microloader loads but then can't find app.json which is understandable as the microloader looks under

Code:



http://ift.tt/1wARrM5

To me it looks like I need to make the microloader.js/build process aware of the location of the rest of the files and access them relatively to the location of microloader.js.

How can I do that?

Any pointers in the right direction are highly appreciated.

/Mattias






How can I use a production build without the index.html?

Aucun commentaire:

Enregistrer un commentaire