我有以下gulp-cdnizer 的 gulp代码。我想通过指定一个选项来确保angular-timer正常工作,就像我在下面的示例中为 angular 所做的那样。test
如何指定test
角度计时器的选项?
gulp.task('html', function() {
return gulp.src(source + '*.html')
.pipe(gulpcdnizer({
bowerComponents: './dev/components',
defaultCDNBase: "//my.cdn.host/base",
allowRev: true,
allowMin: true,
files: [
/* angular */
{
file: '**/angular/*.js',
package: 'angular',
test: 'window.angular',
cdn: 'cdnjs:angular.js:${ filenameMin }'
},
{
file: '**/angular-timer/dist/*.js',
package: 'angular-timer',
cdn: 'cdnjs:angular-timer:${ filenameMin }'
}
]
})) // replace local dependencies with cdn equivalents
.pipe(gulp.dest(dest)); // copy html to dest directory
});