mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-15 00:20:31 +01:00
Merge pull request #1160 from tfernandez/feature/fixing-gulp-templatecache
fix(gulp): Fix templatecache gulp task
This commit is contained in:
@@ -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'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user