在部署我的应用程序时,我想将 bower 依赖项复制到deploy
目录中,并将这些文件的链接注入到index.html
目录中deploy
。
由于我无法将它们结合起来,因此每一步都可以完美地工作。
复制文件:
return gulp.src(mainBowerFiles(), { read: false })
.pipe(gulp.dest('./deploy/lib/'));
注入文件:
return gulp.src('./deploy/index.html')
.pipe(plugins.inject(
gulp.src(mainBowerFiles(), { read: false }), { relative: true }))
.pipe(gulp.dest('./deploy/'));
我认为我应该一步一步地做到这一点,以保持依赖文件的正确顺序。
我尝试了这种组合,但没有成功。
return gulp.src('./deploy/index.html')
.pipe(plugins.inject(
gulp.src(mainBowerFiles(), { read: false })
.pipe(gulp.dest('./deploy/lib/'), { relative: true })))
.pipe(gulp.dest('./deploy/'));