gulp 打包 seaJS 文件里的路径替换,,请大神指点!!!!


最近新学gulp 打包,

JS 代码使用 seaJS 写的

app/site/main.js 的文件里面:

define(function(){


 require("./mod.js");
require("./plug.js");

})

修改 mod.js plug.js 后执行 gulp 得到资源路径表 rev-manifest.json:


 {
  "app/site/main.js": "app/site/main-f5ebf34e54.js",
  "app/site/mod.js": "app/site/mod-b7e54528aa.js",
  "app/site/plug.js": "app/site/plug-c85089636f.js" 
   ....
}

请问怎么替换seaJS 模块里面的 js 引用路径???

正确应该为:
define(function(){


 require("./mod-b7e54528aa.js");
require("./plug-c85089636f.js");

})

请大神指点一下!!!!!!!

gulp seajs JavaScript

solo同步帝 8 years, 8 months ago

建议你使用 gulp-template https://github.com/sindresorhus/gulp-template
关于更多gulp相关资料,你可以参考我们team的use-gulp项目 https://github.com/Platform-CUF/use-gulp

咆哮的柠檬 answered 8 years, 8 months ago

Your Answer