整合道场建设成为Grails的构建? [英] Integrate Dojo Build into Grails Build?

查看:292
本文介绍了整合道场建设成为Grails的构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解Dojo的构建系统,但我相当新的Grails的。有谁知道,或者有资源,整合Dojo的JS打造成为Grails的?我希望能够在开发过程中使用JS源,然后切换到JS的生产内置版本。

I understand dojo's build system, but I'm rather new to Grails. Does anyone know how, or have a resource for, integrating dojo's JS build into Grails? I'd like to be able to use the JS sources during development, and then switch to the built version of JS for production.

到目前为止,我设想只是有在JS DIR道场-src目录下,并使用在开发过程中。然后,当我要部署到PROD,我将手动运行道场构建和输出也是它在/ JS目录。

So far, I am envisioning just having the dojo-src directory in js dir, and using that during development. Then, when I want to deploy to prod, I'll manually run a dojo build and output it also in the /js dir.

(我打算给我们一个请求参数来判断哪个JS来使用的应用程序,COM pressed或SRC)。

(I'm planning to us a request parameter to tell the app which js to use, compressed or src).

有没有其他更好的,这样我应该考虑?

Is there another, better, way I should consider?

推荐答案

我不知道一大堆有关Grails的,但我认为你是在正确的道路上。我使用的查询参数设置为使用配置,但我的配置存储在会话,这样我不需要它每一页上。

I don't know a whole lot about grails, but I think you are on the right path. I use a query parameter to set the configuration to use, but i store the configuration in the session, so that I don't need it on every page.

看看我的回答是:
<一href=\"http://stackoverflow.com/questions/11020267/how-do-i-use-uncom$p$pssed-files-in-dojo-1-7/11034664#11034664\">How我用uncom pressed文件道场1.7?

从我已阅读Grails的,它使用蚂蚁建筑。这是一个Ant脚本来构建。我不知道如何将它集成到为建设一个战争GANT约定。

From what I have read on Grails, it uses ant for building. This is an ant script to build. I don't know how to integrate it into the gant convention for building a war.

<java fork="true" dir="${dojo.build.util.dir}/buildscripts"
classname="org.mozilla.javascript.tools.shell.Main">

<classpath>
    <pathelement location="${dojo.build.util.dir}/shrinksafe/js.jar"/>
    <pathelement location="${dojo.build.util.dir}/shrinksafe/shrinksafe.jar"/>
</classpath>

<arg value="build.js"/>
<arg value="version=${version}"/>
<arg value="profileFile=../../profile.js"/>
<arg value="action=release"/>
<arg value="releaseDir=../../../"/>
<arg value="releaseName=${dojo.releaseName}" />
<arg value="optimize=shrinksafe"/>
<arg value="cssOptimize=comments.keepLines"/>
</java>

这篇关于整合道场建设成为Grails的构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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