Skip to content

Commit

Permalink
Fix #3479 Move from grunt-devcode to grunt-preprocessor (#3479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Napho committed Nov 15, 2022
1 parent fc33b0d commit 077defc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
29 changes: 12 additions & 17 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,24 +349,19 @@ module.exports = function(grunt) {
}
},

devcode: {
options: {
html: true, // html files parsing?
js: true, // javascript files parsing?
css: false, // css files parsing?
clean: true, // removes devcode comments even if code was not removed
block: {
open: 'devcode', // with this string we open a block of code
close: 'endcode' // with this string we close a block of code
},
dest: 'dist' // default destination which overwrittes environment variable
},
dist : { // settings for task used with 'devcode:dist'
preprocess: {

dist: {
src: ['dist/**/*.js','dist/**/*.html','dist/*.js','dist/*.html'],
dst: ['dist/'],
options: {
source: 'dist/',
dest: 'dist/',
env: 'production'
inline: true,
context: {
DEBUG: false,
NODE_ENV: 'production'
}
}

}
},

Expand Down Expand Up @@ -425,7 +420,7 @@ module.exports = function(grunt) {

// Default task(s).
grunt.registerTask('default', ['clean', 'jshint', 'copy:dev']);
grunt.registerTask('prod', ['clean:dist', 'clean:server', 'compass:dist', 'copy:prod', 'copy:tests', 'concat', 'uglify:prod', 'devcode:dist', 'hashres','replace']);
grunt.registerTask('prod', ['clean:dist', 'clean:server', 'compass:dist', 'copy:prod', 'copy:tests', 'concat', 'uglify:prod', 'preprocess:dist', 'hashres', 'replace']);
grunt.registerTask('dev', ['clean', 'compass:dev', 'copy:dev']);
grunt.registerTask('test', ['karma']);
grunt.registerTask('deploy', ['prod', 'gh-pages']);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"grunt-contrib-requirejs": "1.0.0",
"grunt-contrib-uglify": "5.0.0",
"grunt-contrib-watch": "1.1.0",
"grunt-devcode": "0.0.4",
"grunt-preprocess": "5.1.0",
"grunt-gh-pages": "4.0.0",
"grunt-hashres": "0.4.1",
"grunt-html-validation": "0.1.18",
Expand Down

0 comments on commit 077defc

Please sign in to comment.