Use of sencha touch jsbiulder

Source: Internet
Author: User

First of all, the purpose of jsbuilder and why jsbuiler should be used are found from the internet in the following statements:

The aim of JS builder is, ultimately, to make your website or application load quicker. it does this by combining your JavaScript and CSS files, Minifying them and outputting them to fewer files. you may, for example, opt to have one CSS file, and two JavaScript files (Ext-all.js and app. JS ). this results in far fewer requests to your server which, although the individual file sizes are larger, boosts performance.

 

Okay, now we use jsbuiler to compress ourCode(Here I use sencha-touch, and extjs also applies ):

In the window (of course there are also operations in Linux and Max, here only the window is introduced ):

1 first, you must have the sencha touch source file. You can download .www.sencha.com.

2 In the source file has a sencha-touch.jsb3, copy this file out, put in our own project directory, slightly modified, renamed myproject. jsb3.

After opening the file, you will find that it is a suitable JSON file, which is clear at a glance. How to Write and select files is not described here.

3. Find the sencha-touch/jsbuilder directory. The following is a jsbuilder. BAT file (the key is this file ).

4. compress the command line:

Open cmd:

Go to the directory where the jsbuilder. BAT file is located and run the following command:

Jsbuilder. Bat-d the directory of the file to be output-the directory of the file where P jsb3 is located-verbose

For example:

Jsbuilder. Bat-d e:/workspace/myproject/depoy-p e:/workspace/myprojec/myproject. jsb3 -- verbose

 

OK. After executing this command, we found that a folder named deploy was added to our project file, it will get the file we want (a compressed file and an uncompressed file), just like Sencha-Touch.js and Sencha-Touch-debug.js (of course if you use extjs, it's like: ext. JS and ext-debug.js)

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.