如何自定义jquery移动构建?

发布于 2024-12-22 11:37:00 字数 124 浏览 1 评论 0原文

我们希望通过删除不需要的模块来使 jquerymobile 更轻。

只想保留一些小部件、ui 控件装饰和触摸事件处理。

还想使用 Zepto 而不是完整的 jquery 库...

谢谢!

We would like to make jquerymobile lighter by removing modules we dont need.

Want to keep only some widgets, ui control decorations and touch event processing.

Would also like to use Zepto instead of the full jquery library...

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烟─花易冷 2024-12-29 11:37:00

jQM 现已解耦:

小部件:现已解耦以实现灵活的构建

我们希望将所有小部件与页面插件分离,以实现
很长一段时间了,我们很高兴地宣布我们终于实现了这个
改变。那么,解耦究竟意味着什么呢?嗯,
各个小部件和实用程序始终被分解为
单独的脚本文件。然而,页面插件负责
处理自动初始化所​​有官方插件
创建页面时的标记。这种情况使得无法
删除不需要的插件而不引起错误,通常
为未来添加小部件树立了一个不好的先例。

现在,jQuery Mobile 库中的几乎所有 UI 小部件都是
完全解耦,因此如果不需要,可以简单地删除它们
特定项目。此更改使您可以显着减少
库的大小,仅包含特定的小部件集或
除了少数必需的核心文件之外,还有您需要的功能。
虽然我们仍然计划进行更多的解耦和清理,但以下内容
文件现在已解耦,可以安全地从 make 文件中删除
在进行自定义构建之前:

  • 页眉/内容/页脚
  • 可折叠
  • 对照组
  • 字段包含
  • 修复页眉页脚
  • 按钮
  • 复选框无线电
  • 选择
  • 滑块
  • 文本输入
  • 链接主题
  • 列表视图
  • 导航栏
  • 网格

我们将处理依赖关系图,因为一些小部件依赖于其他小部件
去工作。例如,按钮标记插件被许多
上面的小部件,因此只能将其排除,但如果您不使用
任何依赖于按钮的小部件。

我们仍在制定地图插件的建议
依赖性和进一步解耦。最终,这将
将出现在下载构建器工具中,敬请期待!

您可以前往他们的 GIT Repo 并下载您想要的内容:

jQM is now decoupled:

Widgets: Now decoupled for flexible builds

We’ve wanted to decouple all our widgets from the page plugin for a
long time now and we’re happy to announce that we finally landed this
change. So what exactly does decoupled mean anyway? Well, the
individual widgets and utilities have always been broken out into
separate script files. However, the page plugin was responsible for
handling the auto-initialization all of the official plugins found in
the markup at page creation. This situation made it impossible to
remove plugins you don’t need without causing errors, and generally
set a bad precedent for future widget additions.

Now, pretty much all the UI widgets in the jQuery Mobile library are
completely decoupled so they can simply be deleted if not needed for a
particular project. This change allows you to dramatically reduce the
size of the library by only including the specific set of widgets or
features you need, in addition to the handful of required, core files.
While we still plan to do more decoupling and cleanup, the following
files are now decoupled and can safely be removed from the make file
before you do a custom build:

  • page header/content/footer
  • collapsible
  • controlgroup
  • fieldcontain
  • fixheaderfooter
  • button
  • checkboxradio
  • select
  • slider
  • textinput
  • links theming
  • listview
  • navbar
  • grid

We will work on a dependency map because a few widgets rely on others
to work. For example, the button markup plugin is called by many of
the widgets above, so it can only be excluded but if you’re not using
any of the widgets that depend on buttons.

We’re still working out our recommendations for mapping plugin
dependencies and decoupling things even further. Ultimately, this will
be surfaced in a download builder tool, so stay tuned!

You can head over to their GIT Repo and just download what you want:

清晨说晚安 2024-12-29 11:37:00

不确定您是否只是在寻找活动支持,但这对我有用:

<script type="text/javascript" src="js/jquery.mobile.define.js"></script>
<script type="text/javascript" src="js/jquery.mobile.core.js"></script>
<script type="text/javascript" src="js/jquery.mobile.media.js"></script>
<script type="text/javascript" src="js/jquery.mobile.support.js"></script>
<script type="text/javascript" src="js/jquery.mobile.vmouse.js"></script>
<script type="text/javascript" src="js/jquery.mobile.event.js"></script>

Not sure if you're just looking for event support, but this worked for me:

<script type="text/javascript" src="js/jquery.mobile.define.js"></script>
<script type="text/javascript" src="js/jquery.mobile.core.js"></script>
<script type="text/javascript" src="js/jquery.mobile.media.js"></script>
<script type="text/javascript" src="js/jquery.mobile.support.js"></script>
<script type="text/javascript" src="js/jquery.mobile.vmouse.js"></script>
<script type="text/javascript" src="js/jquery.mobile.event.js"></script>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文