1

I've been working with JQM a quite awhile now - and as many of you know it really shines when all of the page structures are in one page. This becomes quite a little maintenance issue if multiple people are working on the same file. So I was thinking what if there was a way similar to how I use less to run a compile of seperate .jqm files and merge them into one page structure.

Has anyone ever done this?

For those that have used less. I do something like this for my CSS files

layout.less pages.less

Then I have one app.less that essentially I run through less compiler and it spits out my nicely formatted CSS from the layout.less and page.less

4

1 回答 1

0

我们使用Grunt进行 JS 编译,浏览他们的插件,我看到一个名为“contrib-stylus 将 LESS 文件编译为 CSS”的插件。无论如何,如果您还没有听说过 Grunt,它似乎是一种将脚本添加到您的环境中的新方法,并且可以做很多很酷的事情。

另外,多页面 jQM 项目有什么问题?更少的初始加载,后续页面的 AJAX 加载很好,如果你把所有的 JS 放在一个地方,管理起来并不难。

于 2012-10-10T21:19:44.753 回答