本文介绍了什么是最小的ExtJS包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道Ext JS 2.2所需的最低限度的文件?我知道ExtJS网站有一个功能来一个小版本的ExtJS(ext。 js)作为ext-all.js的替代,但这是为了最小化客户端上的ExtJS的大小。我有兴趣尽量减少服务器上的内容。目前,SDK附带以下子目录:



ext-2.2 /



  adapter 
air
build
docs
示例
资源

我认为它非常安全地删除示例,文档和空格。但是,有没有其他的东西我们可以删除,使这个更小或有资源(除了大的JavaScript源代码语料库),记录最低要求的文件?

解决方案

此链接解释包含订单



这是最小包含设置

 < link rel =stylesheettype =text / csshref =../ extjs / resources / css / ext-all.css> 
< script type =text / javascriptsrc =../ extjs / adapter / ext / ext-base.js>< / script>
< script type =text / javascriptsrc =../ extjs / ext-all.js>< / script>

ext-all.css依赖于../extjs/resources/css中的文件,所以你应该包括整个目录结构。



所以你最少需要以下文件




  • extjs / resources / ** / *

  • extjs / adapter / ext / ext-base.js

  • extjs / all.js



如果您没有为任何UI组件使用Ext JS,那么您不需要任何样式表并支持图片,但在这种情况下,您必须质疑为什么要使用Ext JS,因为这是很重要的。


Does anyone know the bare minimum files required for Ext JS 2.2? I know the ExtJS site has a feature to "build" a small version of ExtJS (ext.js) as a replacement for ext-all.js but that's for minimizing the size of ExtJS on the client. I'm interested in minimizing what's on the server. Currently the SDK comes with the following subdirectories:

ext-2.2/

adapter
air
build
docs
examples
resources
source

I think its pretty safe to remove examples, docs, and air. However, are there other things we can remove to make this smaller or is there a resource (besides the large javascript source code corpus) that documents the minimum required files?

解决方案

This link explains the include orderWhat is the proper include order for my JavaScript files?

This is the minimum include set

<link rel="stylesheet" type="text/css" href="../extjs/resources/css/ext-all.css">
<script type="text/javascript" src="../extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../extjs/ext-all.js"></script>

The ext-all.css depends on files in ../extjs/resources/css so you should include that entire directory structure also.

So you'd need the following files at a minimum

  • extjs/resources/**/*
  • extjs/adapter/ext/ext-base.js
  • extjs/ext-all.js

If you're not using Ext JS for any of the UI components then you don't need any of the stylesheets and supporting images, but in that case you'd have to question why you're using Ext JS since that's it's strong point.

这篇关于什么是最小的ExtJS包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 00:54