This example demonstrates creating a basic application in ExtJS using Sencha Cmd to bootstrap the process - this method will automatically generate some code and a skeleton structure for the project.
Open a console window and change the working directory to an appropriate space in which to work. In the same window and directory run the following command to generate a new application.
> sencha -sdk /path/to/ext-sdk generate app HelloWorld ./HelloWorld
Note: The -sdk
flag specifies the location of the directory extracted from the framework archive.
In ExtJS 6+ Sencha have merged both the ExtJS and Touch frameworks into a single codebase, differentiated by the terms classic and modern respectively. For simplicity if you do not wish to target mobile devices, an additional flag may be specified in the command to reduce clutter in the workspace.
> sencha -sdk /path/to/ext-sdk generate app -classic HelloWorld ./HelloWorld
Without any further configuration, a fully functional demo application should now reside in the local directory. Now change the working directory to the new HelloWorld
project directory and run:
> sencha app watch
By doing this, the project is compiled using the default build profile and a simple HTTP server is started which allows the viewing of the application locally through a web browser. By default on port 1841.