From 2e323524391cc92aa491efaf6677a8f7e9bc476f Mon Sep 17 00:00:00 2001 From: Christian Stuff Date: Mon, 16 Apr 2018 23:08:46 +0200 Subject: [PATCH] Issue #1834 - Fix path to templates.js. Use jsDIstPath in grunt config --- Gruntfile.js | 1 + grunt-tasks/concat.js | 12 ++++++------ grunt-tasks/jst.js | 2 +- grunt-tasks/uglify.js | 12 ++++++------ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index eb868406a..092605bd8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,6 +7,7 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON("package.json"), tmplPath: "webcompat/templates/", jsPath: "webcompat/static/js", + jsDistPath: "<%= jsPath %>/dist", cssPath: "webcompat/static/css", imgPath: "webcompat/static/img", banner: "/*! <%= pkg.title %>\n" + diff --git a/grunt-tasks/concat.js b/grunt-tasks/concat.js index 10ace5b7d..22f914c2c 100644 --- a/grunt-tasks/concat.js +++ b/grunt-tasks/concat.js @@ -23,9 +23,9 @@ module.exports = function(grunt) { "<%= jsPath %>/lib/flash-message.js", "<%= jsPath %>/lib/homepage.js", "<%= jsPath %>/lib/bugform.js", - "<%= jsPath %>/templates.js" + "<%= jsDistPath %>/templates.js" ], - dest: "<%= jsPath %>/dist/<%= pkg.name %>.js" + dest: "<%= jsDistPath %>/<%= pkg.name %>.js" }, diagnose: { src: [ @@ -33,7 +33,7 @@ module.exports = function(grunt) { "<%= jsPath %>/lib/models/issue.js", "<%= jsPath %>/lib/diagnose.js" ], - dest: "<%= jsPath %>/dist/diagnose.js" + dest: "<%= jsDistPath %>/diagnose.js" }, issues: { src: [ @@ -47,7 +47,7 @@ module.exports = function(grunt) { "<%= jsPath %>/lib/comments.js", "<%= jsPath %>/lib/issues.js" ], - dest: "<%= jsPath %>/dist/issues.js" + dest: "<%= jsDistPath %>/issues.js" }, issueList: { src: [ @@ -56,7 +56,7 @@ module.exports = function(grunt) { "<%= jsPath %>/lib/mixins/pagination.js", "<%= jsPath %>/lib/issue-list.js" ], - dest: "<%= jsPath %>/dist/issue-list.js" + dest: "<%= jsDistPath %>/issue-list.js" }, userActivity: { src: [ @@ -65,7 +65,7 @@ module.exports = function(grunt) { "<%= jsPath %>/lib/mixins/pagination.js", "<%= jsPath %>/lib/user-activity.js" ], - dest: "<%= jsPath %>/dist/user-activity.js" + dest: "<%= jsDistPath %>/user-activity.js" } }); }; diff --git a/grunt-tasks/jst.js b/grunt-tasks/jst.js index a211aa7fb..a9498223d 100644 --- a/grunt-tasks/jst.js +++ b/grunt-tasks/jst.js @@ -23,7 +23,7 @@ module.exports = function(grunt) { } }, files: { - "<%= jsPath %>/dist/templates.js": ["<%= tmplPath %>/**/*.jst"] + "<%= jsDistPath %>/templates.js": ["<%= tmplPath %>/**/*.jst"] } } }); diff --git a/grunt-tasks/uglify.js b/grunt-tasks/uglify.js index 6bbfdac82..2633ff608 100644 --- a/grunt-tasks/uglify.js +++ b/grunt-tasks/uglify.js @@ -10,7 +10,7 @@ module.exports = function(grunt) { }, dist: { src: "<%= concat.dist.dest %>", - dest: "<%= jsPath %>/dist/<%= pkg.name %>.min.js" + dest: "<%= jsDistPath %>/<%= pkg.name %>.min.js" }, ga: { src: "<%= jsPath %>/lib/ga.js", @@ -18,23 +18,23 @@ module.exports = function(grunt) { }, issues: { src: "<%= concat.issues.dest %>", - dest: "<%= jsPath %>/dist/issues.min.js" + dest: "<%= jsDistPath %>/issues.min.js" }, issueList: { src: "<%= concat.issueList.dest %>", - dest: "<%= jsPath %>/dist/issue-list.min.js" + dest: "<%= jsDistPath %>/issue-list.min.js" }, userActivity: { src: "<%= concat.userActivity.dest %>", - dest: "<%= jsPath %>/dist/user-activity.min.js" + dest: "<%= jsDistPath %>/user-activity.min.js" }, diagnose: { src: "<%= concat.diagnose.dest %>", - dest: "<%= jsPath %>/dist/diagnose.min.js" + dest: "<%= jsDistPath %>/diagnose.min.js" }, contributors: { src: "<%= jsPath %>/lib/contributors.js", - dest: "<%= jsPath %>/dist/contributors.min.js" + dest: "<%= jsDistPath %>/contributors.min.js" } }); };