[Study Notes] what is sencha cmd?

Source: Internet
Author: User

Address: http://blog.csdn.net/sushengmiyan/article/details/38295575

Sushengmiyan

--------------------------------------------------------------- Resource link -----------------------------------------------------------------------

Sencha cmd Official Website: http://www.sencha.com/products/extjs/up-and-running/cmd-introduction

Java SE 8 download Official Website: http://www.oracle.com/technetwork/java/javase/downloads/index.html? Sssourcesiteid = ocomen

Sencha cmd official website download: http://www.sencha.com/products/sencha-cmd/download

Ruby package: http://rubyinstaller.org/

Certificate ------------------------------------------------------------------------------------------------------------------------------------------------


Introduction to sencha cmd

--------------------------

Sencha CMD is a cross-platform command line tool that provides many automated execution tasks from the creation of your application to the entire lifecycle of the deployed product.


Sencha cmd

------------------------

Sencha cmd provides a series of powerful time-saving functions, which work together with the sencha ext JS and sencha touch frameworks. Sencha cmd provides the following capabilities:

1. Code Generation Tool: the code generation tool generates the entire application and extends the MVC component generation.

2. js Compilation: Framework awareness. The javascript compiler understands the semantic syntax of sencha and generates a small footprint when building your source code. The compiler uses the sencha framework to load application time to optimize high-level semantics.

3. Network Service: Provides Lightweight network services.

4. Local packaging: access devices to mobile apps with first-class mobile apps and distribute them to mobile stores conveniently.

5. Packaging Management System: a management system that facilitates integration (such as the topic of ext JS)

6. Build scripts. Add "before" and "after" to the application to allow the customer to customize scripts suitable for their needs.

7. Conversion Tool: A Powerful code selector converts the Code required for final construction in your project, and determines the High-level selection set of page and Local Shared code to be constructed as you need.

8. workspace management: different applications share the framework work, and the custom code of Baohe is transparent.

9. Image extraction: converting the characteristics of css3 (such as boundary radius and linear gradient)

10. flexible configuration system: Allows command line operations on a single machine or at the workspace level or throughout the workspace.

11. Diary function: the powerful log function helps you understand the entire internal command line work and eliminate faults.

12. Third-party control: sencha cmd contains compass sass, ant,

13. Code Generation HOOK: You can specify a page or share all pages in the work control, such as checking the daunting conventions or generating a new model.


Compatibility

---------

Sencha cmd supports sencha ext JS 4.1.1a and later versions, as well as sencha touch 2.1 and later versions. Many new functions need to work with the support of the framework and are available versions.

For the old version, some low-level commands can be used.

If you are using an earlier version of ext JS, you can use the build command of sencha cmd to construct your JSB file. In other words, sencha cmd can generate a compressed constructor package to replace the previous version. This operation will not update your JSB files generated by the previous SDK.

Sencha touch2.0 and sencha ext JS 4.0 require sdk2.0 tools, which will not be supported in future versions.


System Installation

--------------

Download the installation package and install it on your computer.

1. JRE sencha cmd requires the Java Runtime Environment and 1.7 or later Java environment support. The minimum requirement is the Java 1.6 version. See the top

2. See sencha CMD at the top.

3. Ruby

Different versions are required for different Ruby operating systems. Different versions are downloaded based on different operating systems. The supported version, preferably Ruby 1.7 download URL, can be found at the top


Installation confirmation successful

-----------------

To ensure that the sencha installation is successful, open the command line cmd to switch to the installation directory and enter the sencha command. If the sencha cmd v5.x. X is displayed, the installation is successful.


If the preceding information is not displayed, check whether the preceding steps are correct.


Update your sencha cmd

------------------------------

Run sencha upgrade -- check

If -- check is not included, you can download and install the latest version.


Release of Beta

To obtain the beta version, you must use sencha upgrade -- check -- beta.


Sencha basic commands

----------------------

Use the Help Command

Sencha help

Sencha Cmd v5.0.n.n...Options  * --cwd, -cw - Sets the directory from which commands should execute  * --debug, -d - Sets log level to higher verbosity  * --info, -i - Sets log level to default  * --nologo, -n - Suppress the initial Sencha Cmd version display  * --plain, -pl - enables plain logging output (no highlighting)  * --quiet, -q - Sets log level to warnings and errors only  * --sdk-path, -s - The location of the SDK to use for non-app commands  * --time, -ti - Display the execution time after executing all commandsCategories  * app - Perform various application build processes  * compass - Wraps execution of compass for sass compilation  * compile - Compile sources to produce concatenated output and metadata  * cordova - Manage Cmd/Cordova integration  * fs - Utility commands to work with files  * generate - Generates models, controllers, etc. or an entire application  * manifest - Extract class metadata  * package - Manages local and remote packages  * phonegap - Manage Cmd/PhoneGap integration  * repository - Manage local repository and remote repository connections  * theme - Commands for low-level operations on themes  * web - Manages a simple HTTP file serverCommands  * ant - Invoke Ant with helpful properties back to Sencha Cmd  * build - Builds a project from a legacy JSB3 file.  * config - Load a properties file or sets a configuration property  * help - Displays help for commands  * js - Executes arbitrary JavaScript file(s)  * upgrade - Upgrades Sencha Cmd  * which - Displays the path to the current version of Sencha Cmd

Current path

-----------

In most cases, sencha cmd requires you to set a special path, or you only need to know information about the sencha SDK. the SDK can automatically detect that when an application is created from a folder, some commands can be extracted from the SDK folder.

Important: In the following command, sencha cmd needs to run and generate an application from the following folder.

Sencha generate... (app, package, workspace)

Sencha app...

This is also true for the package. When you run a sencha package build, the current path must be a package folder.


Sencha cmd documentation

-----------------------

Many sencma cmd know that they help organizations build your cognition. They need you to follow these requirements. If you skip, you may get some confusing results.

At the beginning of each guide, you should learn the knowledge you need in the early stage. Further, many guides will end with a lot of further reading.


Other than basic knowledge

----------------

There are many other help details about the use of sencha cmd commands. You can use the help command to get more help. However, if you need more advanced help, you need to download advanced sencha cmd.


Troubleshooting

------------

If sencha: Command not found appears in OSX/Linux, or sencha is not recognized as an internal or external command appears in widows, operable program or Bach file:

1. Close all command lines and re-open

2. Ensure that sencha CMD is correctly installed.


Ruby cannot be found:

If you see an error about Ruby installation, you may have to review the problem about Ruby installation.

Not in the current directory:

A common error is that it does not run in the current directory. Sometimes you need to develop the SDK path, but this error will pop up when you do not specify the path.

Note: a valid path is generated by using sencha cmd.

The following error occurs when you resolve the dependency:

The sencha app buildcommand can read your index.html to scan your desired class information. If your application has no life-required class information, the construction will be completed but will not contain all the classes required by your application.

To ensure that you load all the required classes, you can use the DEBUG command line method, such as using the options of IE developers or fiefox's fiebug function, eliminate all alerts.

When you see the following warning:

[Ext.Loader] Synchronously loading 'Ext.foo.Bar'; consider adding 'Ext.foo.Bar'explicitly as a require of the corresponding class
Set Ext. foo. bar is added from the requies array. If many dependencies are required, add it to the attribute array of requies. Actually, ext. application (...) statement.

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.