- 浏览: 802101 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (360)
- Java (101)
- JPA/Hibernate (10)
- Spring (14)
- Flex/BlazeDS (37)
- Database (30)
- Lucene/Solr/Nutch (0)
- Maven/Ant (25)
- CXF/WebService (3)
- RPC/RMI/SOAP/WSDL (1)
- REST (6)
- TDD/BDD/JUnit (1)
- Servlet/JSP (2)
- AI/MachineLearning (3)
- Resource (1)
- 字符编码 (2)
- OOA/OOPS/UML (5)
- DesignPattern (8)
- 算法与数据结构 (11)
- Web&App Server (13)
- 并发&异步&无阻塞 (7)
- Entertainment (4)
- JavaScript/ExtJS (45)
- CodeStyle&Quality (1)
- svn/git/perforce (8)
- JSON (2)
- JavaScriptTesting (4)
- Others (6)
- RegularExpression (2)
- Linux/Windows (12)
- Protocal (2)
- Celebrities (1)
- Interview (1)
- 计算机语言 (1)
- English (2)
- Eclipse (5)
- TimeZone/时区 (1)
- Finance (1)
- 信息安全 (1)
- JMS/MQ (2)
- XSD/XML/DTD (3)
- Android (4)
- 投资 (3)
- Distribution (3)
- Excel (1)
最新评论
-
qdujunjie:
如果把m换成具体的数字,比如4或者5,会让读者更明白
m阶B树中“阶”的含义 -
java-admin:
不错,加油,多写点文章
关于Extjs的mixins和plugin -
xiehuaidong880827:
你好,我用sencha cmd打包完本地工程后,把app.js ...
ExtJS使用Sencha Cmd合并javascript文件为一个文件 -
KIWIFLY:
lwpan 写道inverse = "true&qu ...
Hibernate中什么时候使用inverse=true -
luedipiaofeng:
good
消除IE stop running this script弹出框
1. Motivation
To reduce page load time by reducing the requests of fetching JavaScript files.
2. Creating a production build manually
Download and Install Sencha Cmd and Extjs sdk
1) Download SenchaCmd-3.1.2.342-windows.exe and ext-4.2.1-gpl.zip
2) Install SenchaCmd-3.1.2.342-windows.exe
3) Add Sencha cmd bin directory to you path, for me, C:\tools\SenchaCmd\bin\Sencha\Cmd\3.1.2.342 is added to my path
4) Extract ext-4.2.1-gpl.zip, assume the extracted folder name is C:\tools\ext-4.2.1.883
Create a new Sencha Cmd Project for getting the configuration files required to build iem-web
1) Open a command prompt
2) Change directory to C:\tools\ext-4.2.1.883
3) Enter the following command
sencha generate app IEM ProjectBuild/IEM
4) You will see a generated project named IEM under C:\tools\ext-4.2.1.883\ProjectBuild\IEM
5) Why we need this step? We want to get the configuration files required by sencha cmd for iem-web, we can easily do modification on these files instead of creating them manually.
Copy Your Project files into the Sencha Cmd Project
1) Remove app folder under ProjectBuild/IEM
2) Copy iem-web/app folder to ProjectBuild/IEM
3) Copy iem-web/IemApp.js, iemForCompile.jsp, api-debug.js, Util.js to ProjectBuild/IEM
Create a Production Build
1) Modify ProjectBuild/IEM/.sencha/app/sencha.cfg file.
a) set app.classpath=${app.dir}/app,${app.dir}/iemApp.js
b) set app.page.name=iemForCompile.jsp
2) add “skip.sass=true” to ProjectBuild/IEM/.sencha/app/production.properties
3) Open a command prompt and change directory to ProjectBuild/IEM
4) Enter the following command:
sencha app build
5) You will see the generated files under C:\tools\ext-4.2.1.883\build\IEM\production
all-classes.js and iemForCompile.jsp
6) Rename iemForCompile.jsp to iem.jsp
7) Copy the all-classes.js and iem.jsp to your tomcat
8) Open iem.jsp and do the following change
a) Change
<link rel="stylesheet" type="text/css" href="../../resources/ext-theme-classic/ext-theme-classic-all.css">
To
<link rel="stylesheet" type="text/css" href="ext/resources/ext-theme-classic/ext-theme-classic-all.css">
b) Remove <link rel="stylesheet" href="resources/IEM-all.css"/>
9) Your final iem.jsp will look like this
Jsp related codes are omitted …
10) test your application at http://localhost:8080/iem-web/iem.jsp
3. Integrating the build with maven
Copy extjs related files and sencha cmd related files required by building process to iem-web\jsBuild folder.
Please note this step is to prepare the execution environment for iem-web, the JavaScript files of iem-web are not in this folder, and they will be copied in maven.
Run sencha generate app IEM ProjectBuild/IEM command under iem-web\jsBuild\ext-4.2.1.883 to generate an empty IEM project and the configuration files we need.
Still we don’t have the iem-web JavaScript files.
Modify configuration files as described on section “Creating a production build manually” to configure iem-web project properly.
The folder structure looks like as following screenshot:
Modify pom.xml to do the integration
1) Copy iem-web JavaScript files to jsBuild/ext-4.2.1.883/ProjectBuild/IEM/ for build
2) We need to do some modification, because we need to run the “sencha app build” command under jsBuild/ext-4.2.1.883/ProjectBuild/IEM folder, so we need to modify some related path in iem.jsp
3) Start the build by executing external command in maven or use maven execution plug-in to do this
a) By executing external command
The content of jsBuild.bat:
The content of jsBuild.sh
b) Use maven execution plug-in
The purpose of running bat or sh files is to run “sencha app build” under the specified folder jsBuild\ext-4.2.1.883\ProjectBuild\IEM, this is required by sencha cmd, otherwise they are a lot of configuration files need to adjusted and I am not sure whether we can adjust them correctly.
4) Also don’t forget to clean up the related files in a new round of building
5) A sample pom.xml related SenchaCmd is as following:
SenchaCmd Intergration with Maven
4. Frequent build failure error
1) Try not code in the following way
Ext.define(‘YourClass’,{
name:’hello’,
store: Ext.create(‘StoreClass’);
});
Try to instantiate store in initComponent method
2) Missed some required class
3) Required class is in all-classes.js, but its definition after its usage
To reduce page load time by reducing the requests of fetching JavaScript files.
2. Creating a production build manually
Download and Install Sencha Cmd and Extjs sdk
1) Download SenchaCmd-3.1.2.342-windows.exe and ext-4.2.1-gpl.zip
2) Install SenchaCmd-3.1.2.342-windows.exe
3) Add Sencha cmd bin directory to you path, for me, C:\tools\SenchaCmd\bin\Sencha\Cmd\3.1.2.342 is added to my path
4) Extract ext-4.2.1-gpl.zip, assume the extracted folder name is C:\tools\ext-4.2.1.883
Create a new Sencha Cmd Project for getting the configuration files required to build iem-web
1) Open a command prompt
2) Change directory to C:\tools\ext-4.2.1.883
3) Enter the following command
sencha generate app IEM ProjectBuild/IEM
4) You will see a generated project named IEM under C:\tools\ext-4.2.1.883\ProjectBuild\IEM
5) Why we need this step? We want to get the configuration files required by sencha cmd for iem-web, we can easily do modification on these files instead of creating them manually.
Copy Your Project files into the Sencha Cmd Project
1) Remove app folder under ProjectBuild/IEM
2) Copy iem-web/app folder to ProjectBuild/IEM
3) Copy iem-web/IemApp.js, iemForCompile.jsp, api-debug.js, Util.js to ProjectBuild/IEM
Create a Production Build
1) Modify ProjectBuild/IEM/.sencha/app/sencha.cfg file.
a) set app.classpath=${app.dir}/app,${app.dir}/iemApp.js
b) set app.page.name=iemForCompile.jsp
2) add “skip.sass=true” to ProjectBuild/IEM/.sencha/app/production.properties
3) Open a command prompt and change directory to ProjectBuild/IEM
4) Enter the following command:
sencha app build
5) You will see the generated files under C:\tools\ext-4.2.1.883\build\IEM\production
all-classes.js and iemForCompile.jsp
6) Rename iemForCompile.jsp to iem.jsp
7) Copy the all-classes.js and iem.jsp to your tomcat
8) Open iem.jsp and do the following change
a) Change
<link rel="stylesheet" type="text/css" href="../../resources/ext-theme-classic/ext-theme-classic-all.css">
To
<link rel="stylesheet" type="text/css" href="ext/resources/ext-theme-classic/ext-theme-classic-all.css">
b) Remove <link rel="stylesheet" href="resources/IEM-all.css"/>
9) Your final iem.jsp will look like this
Jsp related codes are omitted …
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>IEM</title> <link rel="stylesheet" type="text/css" href="ext/resources/ext-theme-classic/ext-theme-classic-all.css"> <link rel="stylesheet" type="text/css" href="css/app_style.css"> <link rel="stylesheet" type="text/css" href="css/iemStyles.css"> </head> <body> <div align="center" id="divLoadPage" class="loadingText">Loading page, please wait ... </div> </body> <script type="text/javascript" src="all-classes.js"></script> </html>
10) test your application at http://localhost:8080/iem-web/iem.jsp
3. Integrating the build with maven
Copy extjs related files and sencha cmd related files required by building process to iem-web\jsBuild folder.
Please note this step is to prepare the execution environment for iem-web, the JavaScript files of iem-web are not in this folder, and they will be copied in maven.
Run sencha generate app IEM ProjectBuild/IEM command under iem-web\jsBuild\ext-4.2.1.883 to generate an empty IEM project and the configuration files we need.
Still we don’t have the iem-web JavaScript files.
Modify configuration files as described on section “Creating a production build manually” to configure iem-web project properly.
The folder structure looks like as following screenshot:
Modify pom.xml to do the integration
1) Copy iem-web JavaScript files to jsBuild/ext-4.2.1.883/ProjectBuild/IEM/ for build
<plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <id>copy-single-files-for-sench-cmd-build</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>jsBuild/ext-4.2.1.883/ProjectBuild/IEM</outputDirectory> <resources> <resource> <directory>src/main/webapp/</directory> <includes> <include>api-debug.js</include> <include>iemApp.js</include> <include>iem.jsp</include> <include>Util.js</include> </includes> </resource> </resources> </configuration> </execution> <execution> <id>copy-app-folder-for-sench-cmd-build</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>jsBuild/ext-4.2.1.883/ProjectBuild/IEM/app</outputDirectory> <resources> <resource> <directory>src/main/webapp/app</directory> </resource> </resources> </configuration> </execution> </executions> </plugin>
2) We need to do some modification, because we need to run the “sencha app build” command under jsBuild/ext-4.2.1.883/ProjectBuild/IEM folder, so we need to modify some related path in iem.jsp
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>modify iem.jsp for build</id> <phase>initialize</phase> <configuration> <target name="modify iem.jsp for build"> <replace file="${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/iem.jsp" token="ext/resources/" value="../../resources/"/> <replace file="${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/iem.jsp" token="ext/ext-all-debug.js" value="../../ext-dev.js"/> <replace file="${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/iem.jsp" token="ext/ext-all.js" value="../../ext-dev.js"/> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>copy sencha cmd output files and bankup the original jsp file</id> <phase>process-sources</phase> <configuration> <target name="copy sencha cmd output files and bankup the original jsp file"> <!-- first bankup the original iem.jsp --> <copy file="${basedir}/jsBuild/ext-4.2.1.883/build/IEM/production/iem.jsp" tofile="${basedir}/src/main/webapp/iemc.jsp"/> <copy file="${basedir}/jsBuild/ext-4.2.1.883/build/IEM/production/all-classes.js" tofile="${basedir}/src/main/webapp/all-classes.js"/> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>modify generated js file</id> <phase>process-sources</phase> <configuration> <target name="modify generated js file"> <replace file="${basedir}/src/main/webapp/iemc.jsp" token="../../resources" value="ext/resources"/> <replace file="${basedir}/src/main/webapp/iemc.jsp"> <replacetoken><![CDATA[<link rel="stylesheet" href="resources/IEM-all.css"/>]]></replacetoken> <replacevalue><![CDATA[]]></replacevalue> </replace> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin>
3) Start the build by executing external command in maven or use maven execution plug-in to do this
a) By executing external command
<execution> <id>Creating a Production Build with Sencha Command</id> <phase>generate-sources</phase> <configuration> <target> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> <if> <equals arg1="${OS}" arg2="Windows_NT" /> <then> <echo message="invoking jsBuild.bat"/> <echo message="OS =${OS}" /> <echo message="os.name = ${os.name}" /> <echo message="os.arch = ${os.arch}" /> <echo message="os.version = ${os.version}" /> <exec dir="${basedir}" executable="${basedir}\jsBuild\jsBuild.bat"></exec> </then> <else> <echo message="invoking jsBuild.sh"/> <echo message="OS =${OS}" /> <echo message="os.name = ${os.name}" /> <echo message="os.arch = ${os.arch}" /> <echo message="os.version = ${os.version}" /> <exec dir="${basedir}" executable="${basedir}\jsBuild\jsBuild.sh"></exec> </else> </if> </target> </configuration> <goals> <goal>run</goal> </goals> </execution>
The content of jsBuild.bat:
@echo off set "CURRENT_DIR=%cd%" cd jsBuild\ext-4.2.1.883\ProjectBuild\IEM java -Xms256m -Xmx800m -jar ../../../senchaCmd/sencha.jar app build cd "%CURRENT_DIR%" exit
The content of jsBuild.sh
#!/bin/bash CURDIR=${PWD} BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo change to project directory cd jsBuild\ext-4.2.1.883\ProjectBuild\IEM echo current directory is ${PWD} echo *********************************start building js******************************** java -Xms1024m -Xmx1280m -jar ../../../senchaCmd/sencha.jar app build echo *********************************end building js********************************** cd ${CURDIR} exit
b) Use maven execution plug-in
<execution> <id>Creating a Production Build with Sencha Command</id> <phase>generate-sources</phase> <configuration> <target name="Start building process"> <echo message="os.name = ${os.name}"/> <echo message="os.arch = ${os.arch}"/> <echo message="os.version = ${os.version}"/> <echo message="java.class.path = ${java.class.path}"/> <java dir="${basedir}/jsBuild//ext-4.2.1.883/ProjectBuild/IEM" jar="${basedir}/jsBuild/senchaCmd/sencha.jar" fork="true" failonerror="false" maxmemory="800m"> <sysproperty key="DEBUG" value="true"/> <jvmarg line="-Xms256m -Xmx800m"/> <arg value="app"/> <arg value="build"/> <classpath> <pathelement location="${basedir}/jsBuild/senchaCmd/sencha.jar"/> <pathelement path="${java.class.path}"/> </classpath> </java> </target> </configuration> <goals> <goal>run</goal> </goals> </execution>
The purpose of running bat or sh files is to run “sencha app build” under the specified folder jsBuild\ext-4.2.1.883\ProjectBuild\IEM, this is required by sencha cmd, otherwise they are a lot of configuration files need to adjusted and I am not sure whether we can adjust them correctly.
4) Also don’t forget to clean up the related files in a new round of building
<plugin> <!-- Clean up the rsults of copy resources --> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets> <fileset> <directory>${basedir}/src/main/resources/com</directory> </fileset> <fileset> <directory>${basedir}/src/test/resources/com</directory> </fileset> <!-- clean up the copied files for js build --> <fileset> <directory>${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/app</directory> </fileset> <fileset> <directory>${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM</directory> <includes> <include>api-debug.js</include> <include>iemApp.js</include> <include>iem.jsp</include> <include>Util.js</include> </includes> </fileset> <!-- clean up the output files of js build --> <fileset> <directory>${basedir}/jsBuild/ext-4.2.1.883/build/IEM</directory> </fileset> <fileset> <directory>${basedir}/src/main/webapp</directory> <includes> <include>all-classes.js</include> <include>iemc.jsp</include> </includes> </fileset> </filesets> </configuration> </plugin>
5) A sample pom.xml related SenchaCmd is as following:
SenchaCmd Intergration with Maven
<plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <id>copy-single-files-for-sench-cmd-build</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>jsBuild/ext-4.2.1.883/ProjectBuild/IEM</outputDirectory> <resources> <resource> <directory>src/main/webapp/</directory> <includes> <include>api-debug.js</include> <include>iemApp.js</include> <include>iem.jsp</include> <include>Util.js</include> </includes> </resource> </resources> </configuration> </execution> <execution> <id>copy-app-folder-for-sench-cmd-build</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>jsBuild/ext-4.2.1.883/ProjectBuild/IEM/app</outputDirectory> <resources> <resource> <directory>src/main/webapp/app</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <!-- Clean up the rsults of copy resources --> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets> <!-- clean up the copied files for js build --> <fileset> <directory>${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/app</directory> </fileset> <fileset> <directory>${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM</directory> <includes> <include>api-debug.js</include> <include>iemApp.js</include> <include>iem.jsp</include> <include>Util.js</include> </includes> </fileset> <!-- clean up the output files of js build --> <fileset> <directory>${basedir}/jsBuild/ext-4.2.1.883/build/IEM</directory> </fileset> <fileset> <directory>${basedir}/src/main/webapp</directory> <includes> <include>all-classes.js</include> <include>iemc.jsp</include> </includes> </fileset> </filesets> </configuration> </plugin> <!-- <plugin> --> <!-- <groupId>org.codehaus.mojo</groupId> --> <!-- <artifactId>exec-maven-plugin</artifactId> --> <!-- <version>1.2</version> --> <!-- <executions> --> <!-- <execution> --> <!-- <id>Creating a Production Build with Sencha Command</id> --> <!-- <phase>generate-sources</phase> --> <!-- <goals> --> <!-- <goal>exec</goal> --> <!-- </goals> --> <!-- <configuration> --> <!-- <executable>${jsBuildScript}</executable> --> <!-- </configuration> --> <!-- </execution> --> <!-- </executions> --> <!-- </plugin> --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>modify iem.jsp for build</id> <phase>initialize</phase> <configuration> <target name="modify iem.jsp for build"> <replace file="${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/iem.jsp" token="ext/resources/" value="../../resources/"/> <replace file="${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/iem.jsp" token="ext/ext-all-debug.js" value="../../ext-dev.js"/> <replace file="${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/iem.jsp" token="ext/ext-all.js" value="../../ext-dev.js"/> <replace file="${basedir}/jsBuild/ext-4.2.1.883/ProjectBuild/IEM/iem.jsp" token="ext/ext-all-dev.js" value="../../ext-dev.js"/> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>Creating a Production Build with Sencha Command</id> <phase>generate-sources</phase> <configuration> <target name="Start building process"> <echo message="os.name = ${os.name}"/> <echo message="os.arch = ${os.arch}"/> <echo message="os.version = ${os.version}"/> <echo message="java.class.path = ${java.class.path}"/> <java dir="${basedir}/jsBuild//ext-4.2.1.883/ProjectBuild/IEM" jar="${basedir}/jsBuild/senchaCmd/sencha.jar" fork="true" failonerror="false" maxmemory="800m"> <sysproperty key="DEBUG" value="true"/> <jvmarg line="-Xms256m -Xmx800m"/> <arg value="app"/> <arg value="build"/> <classpath> <pathelement location="${basedir}/jsBuild/senchaCmd/sencha.jar"/> <pathelement path="${java.class.path}"/> </classpath> </java> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>copy sencha cmd output files and bankup the original jsp file</id> <phase>process-sources</phase> <configuration> <target name="copy sencha cmd output files and bankup the original jsp file"> <!-- first bankup the original iem.jsp --> <copy file="${basedir}/jsBuild/ext-4.2.1.883/build/IEM/production/iem.jsp" tofile="${basedir}/src/main/webapp/iemc.jsp"/> <copy file="${basedir}/jsBuild/ext-4.2.1.883/build/IEM/production/all-classes.js" tofile="${basedir}/src/main/webapp/all-classes.js"/> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>modify generated js file</id> <phase>process-sources</phase> <configuration> <target name="modify generated js file"> <replace file="${basedir}/src/main/webapp/iemc.jsp" token="../../resources" value="ext/resources"/> <replace file="${basedir}/src/main/webapp/iemc.jsp"> <replacetoken><![CDATA[<link rel="stylesheet" href="resources/IEM-all.css"/>]]></replacetoken> <replacevalue><![CDATA[]]></replacevalue> </replace> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>ant-contrib</groupId> <artifactId>ant-contrib</artifactId> <version>20020829</version> </dependency> </dependencies> </plugin>
4. Frequent build failure error
1) Try not code in the following way
Ext.define(‘YourClass’,{
name:’hello’,
store: Ext.create(‘StoreClass’);
});
Try to instantiate store in initComponent method
2) Missed some required class
3) Required class is in all-classes.js, but its definition after its usage
评论
2 楼
xiehuaidong880827
2015-05-13
你好,我用sencha cmd打包完本地工程后,把app.js拷贝进去不能使用?能不能帮我看一下?QQ765273095 非常感谢
1 楼
cw_xcy
2014-07-18
很实用!试试看看
发表评论
-
Fiddler使用
2017-06-22 16:27 649Fiddler不能捕获chrome request 原因是,c ... -
Javascript跨域
2017-06-21 17:05 621在js中,我们直接用XMLHttpRequest请求不同域上 ... -
面向对象的JavaScript,ECMAScript6, ECMAScript2015
2017-02-11 21:11 558全面理解面向对象的 JavaScript http://www ... -
SASS用法指南
2016-03-03 14:18 698SASS用法指南 http://www.ruanyifeng. ... -
Angular JS与ExtJS比较
2016-01-04 13:54 1617ExtJS vs AngularJS http://www.t ... -
ExtJS POST请求客户端服务端案例
2015-11-10 15:29 1251客户端GUI端示例 var positionIDList = ... -
Javascript设计模式
2015-09-29 14:12 819书名:Learning JavaScript Design P ... -
JavaScript单例模式Singleton Pattern
2015-09-29 14:10 1362参考链接:http://www.dofactory.com/j ... -
Check scope of element in Angular JS
2015-06-16 15:36 763step 1) choose an element in de ... -
有意思的HTML5效果
2015-03-18 09:24 1244http://www.html5tricks.com/9-fu ... -
JavaScript内存溢出
2015-02-13 10:42 1096http://javascript.info/tutorial ... -
JavaScript Variable Scope and Closure(闭包)
2015-02-11 09:52 928参考文章: http://javascript.info/tu ... -
JavaScript电子相册
2015-02-05 09:36 1795http://www.webhek.com/misc/3d-a ... -
JavaScript学习笔记
2015-01-11 10:59 813Repeated and Omitted Declaratio ... -
JavaScript小技巧
2014-12-26 10:00 881关系javascript变量的内存 ... -
JavaScript TimeZone issue
2014-10-31 11:48 0Tue Jan 01 2008 23:45:00 GMT+03 ... -
转义字符处理,获取字符的ASCII码值
2014-10-24 13:58 2024Java 获取字符的ASCII码值 int asciiDec ... -
JavaScript技巧,最佳实践(Best Practice)
2014-10-20 10:03 67845个实用的JavaScript技巧、窍门和最佳实践 http ... -
如何跨域获取Cookie
2014-06-23 14:32 3129cookie可以跨子域访问,如果用户信息保存在qq.com的c ... -
JavaScript获取图片(Image)的大小(宽度,高度)
2014-05-13 17:46 1897如果只有图片的URL function getImageD ...
相关推荐
然后,可以使用Sencha Cmd初始化一个新的ExtJS项目,指定6.2.0 GPL版本,这将自动生成项目目录结构和基础文件。接着,开发者可以在项目中添加组件、配置路由、定义模型、存储和视图等。 对于`ext6.2.0gpl.7z`文件,...
Sencha ExtJS是一款流行的JavaScript框架,用于开发富互联网应用程序(RIA),它提供了丰富的组件和模型,使得开发者能够构建动态且响应式的网页界面。Sencha Cmd是与Sencha ExtJS框架紧密集成的命令行工具,它简化...
Ext JS 是一个广泛使用的JavaScript库,用于构建富客户端的Web应用程序。Sencha Cmd 提供了自动化工具,使得开发者可以专注于编写代码,而无需关心底层构建逻辑。 在深入探讨Sencha Cmd的功能之前,我们首先理解其...
3. **编译与压缩**:`sencha build`命令可以将源代码编译为优化过的JavaScript和CSS,同时可以进行压缩和合并,减少文件大小,提高应用加载速度。 4. **更新依赖**:随着Ext JS库的更新,`sencha update`命令可以...
由于并非所有浏览器都支持ES6,因此Sencha Cmd 6.5还引入了一个转换器,用于将现代代码转换成较旧版本的JavaScript。这个过程可以确保代码在不支持ES6的浏览器上也能正常运行。 - **转换原理**:转换器能够读取使用...
Sencha CMD是Sencha公司开发的一个命令行工具,主要用于帮助开发者构建、管理和部署基于Ext JS和Sencha Touch的Web应用程序。版本7.5是该工具的一个重要更新,它提供了许多新特性和改进,以优化开发流程和提升效率。...
1. **创建项目**:使用`sencha generate app`命令可以快速创建一个新的Ext JS或Sencha Touch应用结构,自动配置好文件夹和基础文件。 2. **构建优化**:通过`sencha app build`命令,可以将源代码转换为生产环境所...
ExtJS是一个用于构建富客户端Web应用的JavaScript库,它提供了丰富的组件库,如表格、图表、菜单等,可以创建功能复杂的用户界面。而ExtAngular则是Sencha公司推出的用于构建现代单页应用(SPA)的框架,它将Angular...
ExtJS是一个广泛使用的JavaScript库,专门用于构建富客户端的Web应用程序。它提供了丰富的组件和工具,可以帮助开发者创建具有复杂用户界面的应用程序。标题中的"ext-7.0.0-gpl.zip"指的是ExtJS框架的一个特定版本,...
ExtJS 4.2 是一个流行的JavaScript框架,用于构建富客户端Web应用程序。它提供了一整套组件、布局管理和数据绑定机制,使得开发者可以创建复杂的、交互式的用户界面。"extjs4.2 最小核心文件"这个标题所指的是运行一...
SenchaCmd 是一个跨平台的命令行工具,它为基于 ExtJS 和 Sencha Touch 应用程序的开发周期提供了全面的支持。从创建应用程序的基础结构到最终部署,SenchaCmd 提供了一系列自动化工具和服务。 #### 二、初遇 ...
这将生成一个优化过的、用于部署的`build`目录,包含了压缩和合并后的JavaScript和CSS文件。 九、部署应用 将`build`目录中的内容上传到你的Web服务器,即可让用户访问你的ExtJS应用程序。 总结: 搭建ExtJS开发...
通过Sencha CMD,你可以使用`ext.jsb2`中的信息来生成一个优化过的JavaScript文件,该文件只包含你的应用程序实际使用到的类,以及它们的依赖。这被称为“应用构建”过程,可以显著减小生产环境中的文件大小。 当从...
- 版本4.0.2.67是Sencha Cmd的一个早期版本,它支持EXTJS的早期版本,帮助开发者管理和构建EXTJS应用程序。 - 使用Sencha Cmd,开发者可以执行诸如`sencha generate app`、`sencha build`等命令,简化开发流程。 ...
如何使用 Sencha Cmd 5 生成 ExtJS 5 项目目前已经发布。 按照入门中的说明下载并安装 Sencha Cmd 5.1。 另请查看。 生成新的 ExtJS 5.1 应用程序: $ sencha generate app -ext MyApp src/main/application 我不...
通过命令行执行`sencha build`命令,这个命令会根据.jsb3文件中的配置,将源代码编译、压缩,并生成一个或多个优化过的JavaScript文件,这些文件可以直接在生产环境中使用。优化过程通常包括合并多个文件到一个文件...
JSBuilder是Sencha官方提供的一个工具,用于合并、压缩和优化ExtJS库中的多个JavaScript文件。这有助于减少页面加载时间,提高应用性能。配置JSBuilder通常包括以下几个步骤: 1. **安装JSBuilder**:下载并安装...
"Ext_cmd.zip_ext cmd_extjs cmd 开发"这个项目就是针对这样的需求,旨在利用ExtJs这一强大的JavaScript框架,构建一个Web版的命令行工具(Cmd)。这个工具将为用户提供在网页中执行命令行操作的可能性,从而拓展了...
EXTJS 6.2 SDK是EXT JavaScript库的一个版本,它是一个强大的前端开发框架,用于构建企业级的Web应用程序。EXTJS提供了丰富的组件库,包括数据管理、图表、表格、窗体和其他用户界面元素,使开发者能够创建功能丰富...
这是如何使用 sencha cmd 来缩小具有非标准文件夹结构的 ExtJS 4 的示例 脚步: 1. 从下载并安装 Sencha cmd 2. 将 sencha 命令添加到 PATH 变量 3. 在项目的根级别创建 .jsb 文件 [ . jsb 文件非常重要,请查看...