I ran sencha app build production
which created a directory build/production
where an app.js file is present.
The question is how do I make the app load the combined app.js file, not the dev files now?
Asked
Active
Viewed 3,814 times
1

Spadar Shut
- 15,111
- 5
- 47
- 54
-
Isn't there an index.html in build/production ? – Titouan de Bailleul Dec 10 '12 at 11:43
-
No, there are `resoures`, `sdk` and another `build` folder and an `app.js` file. – Spadar Shut Dec 10 '12 at 11:51
-
check the sencha docs for details – amrit_neo Dec 10 '12 at 12:09
-
Sencha Touch 2 or 2.1 ? Did the build run without error ? – Titouan de Bailleul Dec 10 '12 at 12:17
-
2.0. Threre are syntax errors like `1:393779 missing } in compound statement`, but thre are no files with this amunt of lines. – Spadar Shut Dec 10 '12 at 12:26
-
@amrit_neo The docs are outdated, they don't help. – Spadar Shut Dec 10 '12 at 12:27
-
what you mean by combined app.js? do you want to say you want to combine model, controllers, view, store classes? – amrit_neo Dec 10 '12 at 12:30
-
I guess that's what `buils production` command does. I want to cancatenate and minify the files used im my app. – Spadar Shut Dec 10 '12 at 12:33
1 Answers
1
Check the building guide :
http://docs.sencha.com/touch/2-0/#!/guide/building
I have used these commands in my app
cd ~/path/to/my/app sencha create jsb -a index.html -p app.jsb3 sencha build -p app.jsb3 -d ./
remember to add all of the classes in app.js. At the end you will get a minified file and you will still have app.js. but the minified file will contain all of the other classes.

amrit_neo
- 1,759
- 4
- 19
- 39