Click to search on your search term.
Subscribe to Fig Leaf Tutorials


Need help with a project? Contact us at sales@figleaf.com.
From code reviews to project "jumpstarts" and full life-cycle development, we've got you covered!
Check out our case studies!
Follow us on Twitter!
Click here to join our Facebook group!

Ready to upgrade your skills? Try these instructor-led classes in Washington, DC:
Ext JS 6 Bootcamp
12/04/2017

Using Sencha Cmd 3 to Create a Production Web Build

Page of 168

Publishing a Sencha Architect Project

Before you can publish a Sencha Touch web project, you must configure the publish path for via the Project Settings dialog as illustrated below:

Setting the Build Path

Once you have configured the publish path, click the Publish button in Sencha Architect to copy your application's assets into the specified directory. Note that you will need to use Sencha Cmd to compress and minify the app.

Using Sencha Cmd

Sencha Cmd is a command-line utility designed to work together and in conjunction with Sencha Touch that provides the following time-saving features:

Command Description
sencha generate app Generates a sample app using the MVC scaffolding
sencha app build Builds the production web version of the app
sencha app upgrade Upgrades the specified application to the SDK at the current working directory.
sencha manifest create Generate a list of metadata for all classes found in the given directories
sencha fs difference Generates the deltas between two files in JSON format
sencha fs minify Minifies a JS file using either YUICompessor (default) or Closure Compiler and UglifyJS
sencha ant Invoke Ant with helpful properties back to Sencha Command

Start a Sencha Cmd Project by opening a command prompt, changing directories to your /touch2/ folder, and typing the following command:

sencha generate app [appName] [path]

Migrating your Sencha Architect Project into Sencha Cmd

Once you have defined a Sencha Cmd-based app, you will need to complete the following steps in order manually copy the published version of your Sencha Architect project into the directory and file structure generated by Sencha Cmd:

  1. Copy /path/to/publishedapp/app to /path/to/MyApp
  2. Copy /path/to/publishedapp/app.js to /path/to/MyApp/app/
  3. Edit /path/to/MyApp/index.html and add metadata (e.g. <title>) as a appropriate.
  4. Test the Sencha Cmd version of your app with your web browser

Creating a Production Build

After you have tested your app running within the Sencha Cmd framework, you can create a production build by completing the following steps:

  1. Open a command prompt
  2. Change directories to the root of your Sencha Cmd-based app
  3. Type the following command:

    sencha app build

Once the build process has completed you can deploy the code found in the
/path/to/app/build/AppName/production folder to your production web server.

Page of 168
comments powered by Disqus