是否可能(以及如何)从Ext JS库中删除未使用的窗口小部件? [英] Is it possible (and how) to remove unutilized widgets from Ext JS library?

查看:206
本文介绍了是否可能(以及如何)从Ext JS库中删除未使用的窗口小部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ext JS基础和小部件在一起为我提供了我一直在寻找的解决方案。 Ext JS库有点重w.r.t.常规标准。



库中有几个小部件,我没有使用。所以我想知道是否可以从ext-all.js中删除相应的代码(未使用的小部件)?



换句话说,是否可以组成一个Ext JS的主Java脚本,它只包含我感兴趣的小部件?如果有一种方式我很想知道。

解决方案

是的,虽然一些组件比其他组件更容易删除,因为有依赖关系。



使用JSBuilder。 http://www.extjs.com/products/jsbuilder/
你需要Java来运行它。



然后,在extjs分发中,每个分支中都有一个名为ext.jsb2的文件,这是JSBuilder项目文件。 p>

将该文件复制到ext-custom.jsb2,然后小心地删除不需要的组件,然后运行如下命令:


java -jar JSBuilder2.jar --projectFile C:\extjs\branches\ext-3.1.x\ext-custom.jsb2 --homeDir C:\ext-custom


输出将在自定义目录中,您将有ext-all.js,等等。只要你的东西。


Ext JS base and widgets together offer me the solution I've been looking for. The Ext JS library is somewhat heavy w.r.t. conventional standards.

There are several widgets in the library that I am not using. So I want to know if it is possible to remove the corresponding code (of widgets not being used) from the ext-all.js ?

To put it in other words, is it possible to compose a master Java Script of Ext JS that comprises of only the widgets of my interest? If there is a way I'd love to know.

解决方案

Yes, though some of the components are easier to remove than others, as there are dependencies.

Use JSBuilder. http://www.extjs.com/products/jsbuilder/ You need Java to run it.

Then, in the extjs distribution there is a file in each branch named "ext.jsb2", which is the JSBuilder project file.

Copy that file to something like "ext-custom.jsb2", then carefully remove components you don't need, then run a command like this:

java -jar JSBuilder2.jar --projectFile C:\extjs\branches\ext-3.1.x\ext-custom.jsb2 --homeDir C:\ext-custom

The output will be in the custom directory, and you'll have ext-all.js, etc. with just your stuff.

这篇关于是否可能(以及如何)从Ext JS库中删除未使用的窗口小部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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