General functions and module custom system (cfcmms)-012Extjs6 development mode and release Mode

Source: Internet
Author: User

General functions and module custom system (cfcmms)-012Extjs6 development mode and release Mode
General functions and module custom system (cfcmms)-012Extjs6 development mode and product Mode
The Extjs6 framework generated using the Sencha cmd command has two modes: Development Mode for development and product release. 1. In the development mode, js files in the cache will not be used when the webpage is refreshed. Your modifications to the js source code will take effect immediately. The Extjs6 css Used in the framework will be under build/development/app/theme/, and a timestamp will be added to all js files that are dynamically called. The command used to generate the development mode isSencha app build development. During development, all programming and debugging should be performed in the Development Mode. If you use the cmd command to generate the product mode, you need to program and debug it again, you still need to use the above command to change the environment to the development mode. The sencha cmd command modifies the bootstrap. js file to generate the development or product mode. 2. When the system is developed and needs to be released, useSencha app build productionTo generate the released product. The released products are stored in the build/production/app directory. Under this directory, app. js is the class used by users in the Framework library of Extjs6 and the compressed files of all user source code. The css files used by Extjs6 will be compressed and placed in the app directory, index.html and app are also generated. json file. In the default configuration of a java web project, you need to add your own resources and java class files and library files to the released directory before creating a released directory. If you have a good understanding of the configuration information in WebContent/app. json, you can generate any resources you need in the release directory. In this way, a directory that can be directly released is compiled with the compilation command. For published products, because all js files are in a compressed file, this file is generally 2-3 M, so users may have some latency when loading the system for the first time. The second time, the File Cache loading speed will be very fast. This is an illustration of some of the content mentioned above:

In, we can see that the production/app directory only contains all the files about Extjs6. For the most basic web system, we need to add the WEB-INF directory. Below we modify the app. json, add "WEB-INF" to the configuration recommendations of resources, after adding should be such code:

    resources: [        {            path: resources,            output: shared        },        {            path: ${toolkit.name}/resources        },        {            path: ${build.id}/resources        },        WEB-INF    ]

Use Sencha app build productionAfter compilation, A WEB-INF directory is added to the release package. For example


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.