gulp版附加CSS,JS - AngularJS

时间:2017-09-05 17:40:36

标签: css angularjs

我在AngularJS中有一个应用程序,并希望对我的JS和CSS文件进行版本控制。我尝试按照以下教程获得更多成功并不明显。

https://github.com/SkeLLLa/gulp-version-append

有人可以帮忙吗?谢谢

1 个答案:

答案 0 :(得分:0)

我已经通过两件事的组合解决了这个问题: gulp-renamegulp-inject

.pipe(rename('main-' + Math.floor(Date.now() / 1000) + '.min.js'))
...

and then


var target = gulp.src('./index.html');
var sources = gulp.src(['./dev/js/*.js'], {read: false});

return target.pipe(inject(sources, {relative: true}))
  .pipe(gulp.dest('.'));

看看这两个库。其他选择并不实际。