0
阅读脚本标记我试图完成与咕嘟咕嘟如下:咕嘟咕嘟:从页脚
- 读取文件
footer.html
和分析在<script src="
标签的所有路径 - 使用gulp-dom-src
; - 将这些路径管入
contact
; uglify
应有尽有;
最后的步骤很简单,但我坚持第一步。我当前的代码是:
var domSrc = require("gulp-dom-src"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify");
var footerFile = "Footer/View-en.html";
gulp.task("deploy", function(){
domSrc({ file: footerFile, selector: "script", attribute: "src" })
.pipe(concat("script.min.js"))
.pipe(uglify())
.pipe(gulp.dest("Dist/Resources/"))
});
如果我尝试调试使用.pipe(debug({title: "pipe:"}));
这似乎是空管,有什么理由?任何其他推荐的软件包来完成相同的?
谢谢。
最有可能的原因是,你犯了一个错误的HTML文件。 –