Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

支持构建依赖的模块 #883

Closed
cloudcome opened this issue Jul 14, 2014 · 11 comments
Closed

支持构建依赖的模块 #883

cloudcome opened this issue Jul 14, 2014 · 11 comments

Comments

@cloudcome
Copy link

增加一个参数,可构建所有依赖的模块,目标目录和原来一样

以下是原文


关于文件后缀debug引发的思考

比如spm中的jquery模块,下载安装之后,在项目里

var $ = require('jquery');

使用spm构建之后:

var $ = require("jquery/2.1.0/jquery-debug");

导致jquery-debug.js文件404错误了。

这个错误本来是可以避免的,因为在jquery的package里已经指明了入口文件为jquery.js。spm上的包都是如此,导致项目require的时候全部出错404。

@popomore
Copy link
Member

理论上你模块的 debug 文件才会指向 jquery 的 debug 文件,不会 404

这东西是给调试用的,少了一步压缩

@cloudcome
Copy link
Author

对,但是jquery-debug.js不存在,怎么调试?

@popomore
Copy link
Member

jquery 也要构建的

@cloudcome
Copy link
Author

jquery是用 spm install jquery --save 下载下来的啊,还要怎么构建?

@hotoo
Copy link
Member

hotoo commented Jul 14, 2014

@cloudcome
Copy link
Author

这下明白了

@popomore
Copy link
Member

以后可以考虑把这个功能集成到 spm 里面 @hotoo @sorrycc

@afc163
Copy link
Member

afc163 commented Jul 14, 2014

spm build --with-deps ?

@cloudcome
Copy link
Author

@sorrycc
Copy link
Member

sorrycc commented Jul 14, 2014

@cloudcome 👍

@hotoo
Copy link
Member

hotoo commented Jul 14, 2014

集成到 spm 时,注意下 seajs 及其插件打包的问题, hotoo/spm-build-deps#8
之前准备使用 seatools 打包的。

@popomore popomore added the build label Jul 16, 2014
@popomore popomore changed the title 关于文件后缀debug引发的思考 支持构建依赖的模块 Jul 16, 2014
@popomore popomore added this to the 3.1 milestone Jul 16, 2014
@popomore popomore mentioned this issue Jul 16, 2014
18 tasks
@sorrycc sorrycc closed this as completed Jul 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants