Grails 2 资源和 yui3 脚本加载器

发布于 2024-12-22 09:45:45 字数 293 浏览 4 评论 0原文

我想将 yui3 与 grails 2 Web 应用程序一起使用,但 grails 2 处理资源的新方式开始让我烦恼。

yui3 加载js文件时似乎有正确的路径,即../static/js/yui3/node-menunav/node-menunav-min.js,但当它尝试加载依赖项时,我得到的只是404错误。

我如何绕过 js 的资源插件,或者我应该完全关闭资源插件,因为这似乎做了很多工作却没有多少收获。

是的,我知道有一个插件,但它只是 JavaScript,不需要插件,我正在努力将插件的使用量保持在最低限度。

I would like to use yui3 with a grails 2 web application but the new way that grails 2 handles resources is starting to annoy me.

yui3 seems to have the path right when is loads the js files, i.e. ../static/js/yui3/node-menunav/node-menunav-min.js but all I get is 404 errors when it tries to load dependencies.

How do I bypass the resources plugin for js or should I turn of the resources plugin altogether, as it seems a lot of work for not much gain.

And yes I know there is a plugin but it's just JavaScript and doesn't need a plugin and I'm trying to keep the plugin usage to a minimum.

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

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

发布评论

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

评论(1

最终幸福 2024-12-29 09:45:45

要么在 BuildConfig.groovy 中注释上面的行:

  • runtime ":resources:1.1.5"

要么将你的 js 包含在 ApplicationResources.groovy 中。

Either comment the line above in your BuildConfig.groovy:

  • runtime ":resources:1.1.5"

Or include your js in your ApplicationResources.groovy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文