Search code examples
sencha-touch-2sencha-cmd

Building a Sencha Touch 2.1 project


I've built myself a small Sencha Touch 2 app, so now i'm trying to make it smaller/minify it

My app looks like

/touch
/app.js
/resources
/ux
/app
/app.json
/index.html
/build.xml

So I was trying to make it more efficient & faster to load so I loaded up Sencha Cmd and ran

sencha compile --classpath=app,touch/src,ux include -all

So it does what looks like compiling it, without giving any errors, it gives a few warnings but those are ok. So it finishes up and nothings changed. The directories are exactly as there were before.

How would I use this correctly to make my app smaller & load faster?


Solution

  • The command

    sencha app build package
    

    or

    sencha app build production
    

    Will minify/package your application. All of the javascript will be contained in a single app.js file, and the javascript+css will be minified. More information about these commands can be found here: http://docs.sencha.com/touch/2-1/#!/guide/command_app