gulp-angular-templatecache
アプリ内でうまく動作するのに深刻な問題があります。私は HotTowel yeomen ジェネレーターを使用しており、少し修正しましたが、テンプレート キャッシュで別のモジュール名を使用するようにできません。関連するgulpfileコードは次のとおりです。
gulp.task('templatecache', ['clean-code'], function() {
log('Creating an AngularJS $templateCache');
return gulp
.src(config.htmltemplates)
.pipe($.if(args.verbose, $.bytediff.start()))
.pipe($.minifyHtml({empty: true}))
.pipe($.if(args.verbose, $.bytediff.stop(bytediffFormatter)))
.pipe($.angularTemplatecache(
'templates.js',
{
module: 'app.templates',
standalone: true,
root: 'app/',
moduleSystem: 'IIFE'
}
))
.pipe(gulp.dest(config.temp));
});
オリジナルの HotTowel gulpfile{module: 'app.core', standalone: false, root: 'app/'}
にはオプションがありました。ビルド プロセスを実行するたびに、愚かな templates.js ファイルは次のようになります。
angular.module("app.core").run(["$templateCache"....
私はそれを変更するために非常に多くのことを試みましたが、決して行きませんapp.templates
. 何か案は?