Skip to content

Commit 0fffc96

Browse files
committed
rm template cache
1 parent abda927 commit 0fffc96

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

gulpfile.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ gulp.task('watch', function () {
7979
gulp.watch(defaultAssets.client.sass, gulp.series('sass', 'csslint')).on('change', plugins.refresh.changed);
8080
gulp.watch(defaultAssets.client.less, gulp.series('less', 'csslint')).on('change', plugins.refresh.changed);
8181

82-
if (process.env.NODE_ENV === 'production') {
83-
gulp.watch(defaultAssets.server.gulpConfig, gulp.series('templatecache', 'eslint'));
84-
gulp.watch(defaultAssets.client.views, gulp.series('templatecache')).on('change', plugins.refresh.changed);
85-
} else {
82+
if (process.env.NODE_ENV !== 'production') {
8683
gulp.watch(defaultAssets.server.gulpConfig, gulp.series('eslint'));
8784
gulp.watch(defaultAssets.client.views).on('change', plugins.refresh.changed);
8885
}
@@ -259,19 +256,6 @@ gulp.task('makeUploadsDir', async function () {
259256
});
260257
});
261258

262-
// Angular template cache task
263-
gulp.task('templatecache', function () {
264-
return gulp.src(defaultAssets.client.views)
265-
.pipe(plugins.templateCache('templates.js', {
266-
root: '/modules/',
267-
module: 'core',
268-
templateHeader: '(function () {' + endOfLine + ' \'use strict\';' + endOfLine + endOfLine + ' angular' + endOfLine + ' .module(\'<%= module %>\'<%= standalone %>)' + endOfLine + ' .run(templates);' + endOfLine + endOfLine + ' templates.$inject = [\'$templateCache\'];' + endOfLine + endOfLine + ' function templates($templateCache) {' + endOfLine,
269-
templateBody: ' $templateCache.put(\'<%= url %>\', \'<%= contents %>\');',
270-
templateFooter: ' }' + endOfLine + '})();' + endOfLine
271-
}))
272-
.pipe(gulp.dest('build'));
273-
});
274-
275259
// Mocha tests task
276260
gulp.task('mocha', function (done) {
277261
var testSuites = testAssets.tests.server;
@@ -459,7 +443,7 @@ gulp.task('default', gulp.series('env:dev', gulp.parallel('copyLocalEnvConfig',
459443

460444
// Run the project in production mode
461445

462-
gulp.task('prod', gulp.series(gulp.parallel('copyLocalEnvConfig', 'makeUploadsDir', 'templatecache'), 'build', 'env:prod', 'lint', gulp.parallel('nodemon-nodebug', 'watch')));
446+
gulp.task('prod', gulp.series(gulp.parallel('copyLocalEnvConfig', 'makeUploadsDir'), 'build', 'env:prod', 'lint', gulp.parallel('nodemon-nodebug', 'watch')));
463447

464448
// Run Mongo Seed with default environment config
465449
gulp.task('seed', gulp.series('env:dev', 'mongo-seed'));

0 commit comments

Comments
 (0)