关于seajs使用grunt构建

105 views
Skip to first unread message

yanfang liu

unread,
Aug 8, 2013, 5:29:47 AM8/8/13
to se...@googlegroups.com
非常喜欢seajs,小巧精悍,感激玉雕等人的工作,可是构建的时候感觉好麻烦。。。。

问题:
在使用grunt构建的时候,如果使用sea-config中的paths配置呢?意思如下:

开发阶段:
sea-config-debug.js
....
paths:{
 "dlgpath":"plugins/dialog"
}
....

module A:
....
require("dlgpath/dlg.js")
....

现在的问题是,在grunt构建时,没办法解析dlgpath,请问各位大侠该如何解决这个问题呢?是此处只能使用alias的方式引用?还是我的方式有问题?


Frank Wang

unread,
Aug 8, 2013, 9:27:52 PM8/8/13
to seajs
构建的时候,在 Gruntfile 里,给 transport 配置上 paths 就好,参考





--
You received this message because you are subscribed to the Google Groups "seajs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seajs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
王保平 / 玉伯(射雕)
送人玫瑰手有余香

yanfang liu

unread,
Aug 8, 2013, 10:57:20 PM8/8/13
to se...@googlegroups.com
非常感谢您的回复,我之前看到过transport中的paths属性,可问题是,在sea-config配置中,paths是键值对的方式,在grunt中的配置是数组方式,也许我还没搞明白这个肿么用?

在 2013年8月9日星期五UTC+8上午9时27分52秒,Frank Wang写道:

Frank Wang

unread,
Aug 9, 2013, 1:44:25 AM8/9/13
to seajs
sorry,那个 grunt 中的 paths 与 seajs config 的 paths 含义不一样
应该是目前 grunt-cmd-transport 还不支持 paths 的解析
到这里提一个 issue 给开发者:


感谢

尽量通过 github 交流讨论。感谢。 
Reply all
Reply to author
Forward
0 new messages