如何打包(最小化)extjs 4应用程序 [英] How to package (minify) an extjs 4 application

查看:130
本文介绍了如何打包(最小化)extjs 4应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找有关包装和精简Ext JS 4应用程序的实际说明.

I am looking for de facto instructions for packaging and minfying an Ext JS 4 app.

一切似乎都指向Sencha SDK,但是围绕它的一切都是针对Sencha Touch的,无论如何,当我按照说明(sencha app build testing)进行操作时,我会收到:

Everything seems to point to the Sencha SDK, but everything around this is targeted at Sencha Touch, and anyway, when I follow the instructions (sencha app build testing) I receive:

当前工作目录(C:...)不是公认的Sencha SDK或应用程序文件夹"

"The current working directory (C:...) is not a recognized Sencha SDK or application folder"

这引起了我的兴趣,因为我使用的结构是由Sencha Architect生成的.查看此处的文档,这是由Architect生成的文件夹结构是正确的,但某些文件名不同.似乎有些打包文件(app.json packager.json)我不知道.

Which throws me, since the structure I am using was generated by Sencha Architect. Looking at the docs here, the folder structure generated by Architect is correct but some of the file names are different. And there seems to be some packaging files (app.json packager.json) that I have no idea about.

我希望考虑到您在开发过程中创建的.js文件的数量减少,您认为这将是常见的要求,因此会发布大量的帖子/指南/博客/文章.

I'd expect loads of posts/guides/blogs/articles on this what you'd think would be a common requirement given the shed load of .js files one creates whilst developing.

推荐答案

此帖子已过时.我们需要使用Sencha Cmd.

This post is much out-dated. We need to be using Sencha Cmd.

  • http://docs.sencha.com/extjs/4.2.1/#!/guide/command
  • http://www.sencha.com/blog/all-new-sencha-cmd

下载: http://www.sencha.com/products/sencha-cmd/下载

一旦您跨过了短暂的学习过程,那就太好了.

A great thing once you've stepped over the short learning curve.

就像运行sencha app build一样简单,它可以创建YUI压缩的javascript和样式表文件,并通过巧妙的处理来确保仅包含您的应用程序所需要的内容-进一步减小了大小.

Its as simple as running sencha app build, which creates YUI compressed javascript and stylesheet files, with clever processing to ensure only what you app needs is included - further reducing the size.

这篇关于如何打包(最小化)extjs 4应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆