From c4b674f2d5e54cbf6089caad164786fb19f70f56 Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Sat, 3 Oct 2015 21:32:42 +0200 Subject: [PATCH 1/7] Update dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 49b01b6..e54698d 100755 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "test": "grunt test" }, "dependencies": { - "grunt-contrib-jade": "~0.14.0", + "grunt-contrib-jade": "~0.15.0", "lodash": "~3.5.0" }, "devDependencies": { From 541bc6b0f8f42ad295358664ecba3412990929f3 Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Sat, 3 Oct 2015 21:43:45 +0200 Subject: [PATCH 2/7] Move to peer deps --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e54698d..eca5c0b 100755 --- a/package.json +++ b/package.json @@ -16,9 +16,11 @@ "test": "grunt test" }, "dependencies": { - "grunt-contrib-jade": "~0.15.0", "lodash": "~3.5.0" }, + "peerDependencies" : { + "grunt-contrib-jade": "~0.15.0", + }, "devDependencies": { "grunt-contrib-nodeunit": "~0.4.1", "grunt-contrib-clean": "~0.4.0", From 10b498fe7eb4f51a61970843407b587bef8960ca Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Sat, 3 Oct 2015 21:44:36 +0200 Subject: [PATCH 3/7] fix --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index eca5c0b..3723163 100755 --- a/package.json +++ b/package.json @@ -18,9 +18,6 @@ "dependencies": { "lodash": "~3.5.0" }, - "peerDependencies" : { - "grunt-contrib-jade": "~0.15.0", - }, "devDependencies": { "grunt-contrib-nodeunit": "~0.4.1", "grunt-contrib-clean": "~0.4.0", @@ -29,6 +26,7 @@ "grunt-release": "~0.6.0" }, "peerDependencies": { + "grunt-contrib-jade": "~0.15.0", "grunt": "~0.4.4" }, "keywords": [ From 2490db40030998210087ecaaf2bb88a6ddd8001b Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Sat, 3 Oct 2015 21:50:58 +0200 Subject: [PATCH 4/7] Revert --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3723163..e54698d 100755 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "test": "grunt test" }, "dependencies": { + "grunt-contrib-jade": "~0.15.0", "lodash": "~3.5.0" }, "devDependencies": { @@ -26,7 +27,6 @@ "grunt-release": "~0.6.0" }, "peerDependencies": { - "grunt-contrib-jade": "~0.15.0", "grunt": "~0.4.4" }, "keywords": [ From 420f35848d84465f13339fc1ed6f657d74d3eced Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Sat, 3 Oct 2015 22:50:27 +0200 Subject: [PATCH 5/7] Renaming task --- tasks/i18n.coffee | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/tasks/i18n.coffee b/tasks/i18n.coffee index 75ca9c9..7edea3e 100755 --- a/tasks/i18n.coffee +++ b/tasks/i18n.coffee @@ -3,18 +3,12 @@ _ = require 'lodash' module.exports = (grunt) -> - try - require 'grunt-contrib-jade' - grunt.loadNpmTasks 'grunt-contrib-jade' - catch e - grunt.loadTasks path.join "#{__dirname}/../node_modules", 'grunt-contrib-jade', 'tasks' + grunt.loadNpmTasks('grunt-contrib-jade') - grunt.renameTask 'jade', 'contrib-jade' - - grunt.registerMultiTask 'jade', 'Compile Jade template with internalization support', -> + grunt.registerMultiTask 'jade-i18n', 'Compile Jade template with internalization support', -> jadeConfig = null - jadeOrigConfig = grunt.config.get('jade')[@target] + jadeOrigConfig = grunt.config.get('jade-i18n')[@target] gruntTaskName = grunt.cli.tasks anotherTargetsForTask = gruntTaskName[0].split ':jade' if gruntTaskName?[0]? @@ -78,16 +72,13 @@ module.exports = (grunt) -> # set the extended config object to the original Jade task if jadeConfig - grunt.config.set 'contrib-jade', jadeConfig + grunt.config.set 'jade', jadeConfig else - grunt.config.set "contrib-jade.#{@target}", jadeOrigConfig + grunt.config.set "jade.#{@target}", jadeOrigConfig # finally run the original Jade task # check if we uses external tasks like grunt-newer - if anotherTargetsForTask?.length > 1 and not languageHasChanged - grunt.task.run anotherTargetsForTask[0] + ':contrib-jade' - else - grunt.task.run 'contrib-jade' + grunt.task.run 'jade' getExtension = (filepath) -> path.extname filepath From 598c054584a826415d273939f326616b4f519793 Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Sat, 3 Oct 2015 23:29:01 +0200 Subject: [PATCH 6/7] Fix, again --- tasks/i18n.coffee | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tasks/i18n.coffee b/tasks/i18n.coffee index 7edea3e..c26bffa 100755 --- a/tasks/i18n.coffee +++ b/tasks/i18n.coffee @@ -5,10 +5,12 @@ module.exports = (grunt) -> grunt.loadNpmTasks('grunt-contrib-jade') - grunt.registerMultiTask 'jade-i18n', 'Compile Jade template with internalization support', -> + grunt.renameTask 'jade', 'contrib-jade' + + grunt.registerMultiTask 'jade', 'Compile Jade template with internalization support', -> jadeConfig = null - jadeOrigConfig = grunt.config.get('jade-i18n')[@target] + jadeOrigConfig = grunt.config.get('jade')[@target] gruntTaskName = grunt.cli.tasks anotherTargetsForTask = gruntTaskName[0].split ':jade' if gruntTaskName?[0]? @@ -72,13 +74,16 @@ module.exports = (grunt) -> # set the extended config object to the original Jade task if jadeConfig - grunt.config.set 'jade', jadeConfig + grunt.config.set 'contrib-jade', jadeConfig else - grunt.config.set "jade.#{@target}", jadeOrigConfig + grunt.config.set "contrib-jade.#{@target}", jadeOrigConfig # finally run the original Jade task # check if we uses external tasks like grunt-newer - grunt.task.run 'jade' + if anotherTargetsForTask?.length > 1 and not languageHasChanged + grunt.task.run anotherTargetsForTask[0] + ':contrib-jade' + else + grunt.task.run 'contrib-jade' getExtension = (filepath) -> path.extname filepath From 890b83d31447c424bc7aaf72818a7961a3c5110c Mon Sep 17 00:00:00 2001 From: Baptiste Jamin Date: Sat, 3 Oct 2015 23:37:59 +0200 Subject: [PATCH 7/7] Incr version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e54698d..da88567 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-jade-i18n", "description": "Compile Jade templates via Grunt with internalization support", - "version": "0.3.4", + "version": "0.3.5", "author": { "name": "Tomas Aparicio", "url": "https://github.com/h2non"