lundi 15 février 2016

Build ExtJS app in Laravel structure

I want to build ExtJS (5.1.0) app in Laravel structure.


+project

++public

+++js

++++admin (built extjs app)

++++libs

+++++ext-5.1.0 (framework)

+project

++resources

+++views

++++admin ******index.blade.php


I ran CMD command (in project/public/js path):

sencha -sdk libs\ext-5.1.0 generate app MyApp admin

In app.json i set:

"indexHtmlPath": "../../../resources/views/admin/index.blade.php"

In index.blade.php i set:

<script id="microloader" type="text/javascript" src="/js/admin/bootstrap.js"></script>

After build the generated bootstrap.js contains:

Ext.manifest = Ext.manifest || "../../../public/js/admin/bootstrap.json";

And bootstrap.json has set all paths with "public" expression. For example:

"Ext.app":"../../../public/js/admin/ext/packages/sencha-core/src/app"

"Ext.browser":"../../../public/js/admin/ext/packages/sencha-core/src/env/Browser.js"

Browser is looking for a myapp.localhost/public/js/admin/bootstrap.js file, but real path is myapp.localhost/js/admin/bootstrap.js (without "public").

I have no idea how to build the app correctly.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire