This post allows you to understand that how to create your first application for the sencha touch 2.
Here are the steps that allows you to create a new application using the terminal/command line:
- Sencha touch 2 downloaded.
- Sencha Cmd installed.
- MAMP already installed on the system.
- Navigate to the directory where you have extracted the contents of the package downloaded from the website. In case you are in a wrong directory and you try to create a new application, the script will be at halt and will show an error.
- Once navigated, type the following
sencha -sdk /path/to/sencha-touch-sdk generate app MyApp /path/to/www/myapp
- On the completion of the script, the location specified in the above command will have the content as follows:
.sencha/ # Sencha-specific files (for example configuration) app/ # Application-specific content sencha.cfg # Configuration file for Sencha Cmd plugin.xml # Plugin for Sencha Cmd workspace/ # Workspace-specific content (see below) sencha.cfg # Configuration file for Sencha Cmd plugin.xml # Plugin for Sencha Cmd</code></strong></pre> touch/ # A copy of the Sencha Touch SDK cmd/ # Sencha Touch-specific content for Sencha Cmd sencha.cfg # Configuration file for Sencha Cmd plugin.xml # Plugin for Sencha Cmd src/ # The Sench Touch source sencha-touch-*.js # Pre-compiled and bootstrap files ... app # Your application's source code in MVC structure controller model profile store view Main.js # The main view of the application resources css app.css # The main stylesheet, compiled from app.scss sass app.scss # The Sass file which compiles to app.css above, # includes Sencha Touch theme by default icons # Application icons for all mobile devices # When replacing these default images with your own, # make sure the file name and the dimension stays exactly the same ... loading # Application start-up screens for iOS devices # Similarly to icons, make sure the file names and # dimension stays the same ... images # Put other images used by your application here index.html app.js # Contains application's initialization logics app.json # Configuration for deployment packager.json # Configuration for native packaging