diff --git a/Gruntfile.js b/Gruntfile.js index 1eb694676..572823b73 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,8 +18,6 @@ /*jslint node: true */ "use strict"; -const path = require('path'); - module.exports = function (grunt) { var helper = require('./tasks/helper.js'), initHelper = helper.init(grunt), @@ -195,33 +193,7 @@ module.exports = function (grunt) { template: 'test/nightwatch_tests/nightwatch.json.underscore', dest: 'test/nightwatch_tests/nightwatch.json' } - }, - - // these rename the already-bundled, minified requireJS and CSS files to include their hash - md5: { - bundlejs: { - files: { 'dist/release/dashboard.assets/js/': 'dist/release/bundle.js' }, - options: { - afterEach: function (fileChanges) { - // replace the REQUIREJS_FILE placeholder with the actual filename - const newFilename = path.basename(fileChanges.newPath); - config.template.release.variables.bundlejs = config.template.release.variables.bundlejs.replace(/BUNDLEJS_FILE/, newFilename); - } - } - }, - - css: { - files: { 'dist/release/dashboard.assets/css/': 'dist/release/styles.css' }, - options: { - afterEach: function (fileChanges) { - // replace the CSS_FILE placeholder with the actual filename - const newFilename = path.basename(fileChanges.newPath); - config.template.release.variables.css = config.template.release.variables.css.replace(/CSS_FILE/, newFilename); - } - } - } - }, - + } }; grunt.initConfig(config); @@ -237,7 +209,6 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-shell'); - grunt.loadNpmTasks('grunt-md5'); /* * Default task */ @@ -255,8 +226,7 @@ module.exports = function (grunt) { grunt.registerTask('dependencies', ['get_deps', 'gen_load_addons:default']); // minify code and css, ready for release. - grunt.registerTask('build', ['copy:distDepsRequire', 'shell:webpackrelease', - 'md5:bundlejs', 'md5:css', 'template:release']); + grunt.registerTask('build', ['copy:distDepsRequire', 'shell:webpackrelease']); /* * Build the app in either dev, debug, or release mode */ @@ -267,13 +237,13 @@ module.exports = function (grunt) { // build a debug release grunt.registerTask('debug', ['clean', 'dependencies', "gen_initialize:development", - 'template:development', 'copy:debug']); + 'copy:debug']); grunt.registerTask('debugDev', ['clean', 'dependencies', "gen_initialize:development", - 'template:development', 'copy:debug', 'shell:webpack']); + 'copy:debug', 'shell:webpack']); grunt.registerTask('devSetup', ['dependencies', "gen_initialize:development", - 'template:development', 'copy:debug']); + 'copy:debug']); grunt.registerTask('devSetupWithClean', ['clean', 'devSetup']); grunt.registerTask('watchRun', ['clean:watch', 'dependencies', 'shell:stylecheck']); diff --git a/assets/index.underscore b/assets/index.underscore index 2d97e0bf4..d92c6e2fa 100644 --- a/assets/index.underscore +++ b/assets/index.underscore @@ -19,11 +19,8 @@ -