Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1160 from tfernandez/feature/fixing-gulp-template…
Browse files Browse the repository at this point in the history
…cache

fix(gulp): Fix templatecache gulp task
  • Loading branch information
ilanbiala committed Feb 10, 2016
2 parents 7f99fd1 + 59d9347 commit 8a705a9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,13 @@ gulp.task('imagemin', function () {

// Angular template cache task
gulp.task('templatecache', function () {
var re = new RegExp('\\' + path.sep + 'client\\' + path.sep, 'g');

return gulp.src(defaultAssets.client.views)
.pipe(plugins.templateCache('templates.js', {
root: 'modules/',
module: 'core',
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,
templateBody: ' $templateCache.put(\'<%= url %>\', \'<%= contents %>\');',
templateFooter: ' }' + endOfLine + '})();' + endOfLine,
transformUrl: function (url) {
return url.replace(re, path.sep);
}
templateFooter: ' }' + endOfLine + '})();' + endOfLine
}))
.pipe(gulp.dest('build'));
});
Expand Down

0 comments on commit 8a705a9

Please sign in to comment.