From 0b9a5706a1316460418630ef460935f54902fb75 Mon Sep 17 00:00:00 2001 From: David Bochenski Date: Fri, 28 Feb 2014 16:09:54 +0000 Subject: [PATCH] Support coffeescript option cucumber-js 0.3.3 added support for coffee script snippets. This allows that flag to be set in the gruntfile. --- README.md | 6 ++++++ tasks/cucumber-js-task.js | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index a1ec8b9..11d513d 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,12 @@ but you can not open source the contributions. Example: `modulePath: "../../custom_libs/cucumberjs/lib/cucumber.js"` +#### coffee +Type: `Boolean` + +Default: `false` + +When true, cucumberjs will output code snippets in coffeescript ### Usage Examples diff --git a/tasks/cucumber-js-task.js b/tasks/cucumber-js-task.js index 45e37a7..0da1dc4 100644 --- a/tasks/cucumber-js-task.js +++ b/tasks/cucumber-js-task.js @@ -12,6 +12,7 @@ module.exports = function (grunt) { var tags = options.tags; var format = options.format; var modulePath = options.modulePath; + var coffee = options.coffee; grunt.verbose.writeflags(options, 'Options'); @@ -62,6 +63,10 @@ module.exports = function (grunt) { execOptions.push(format); } + if (coffee) { + execOptions.push('--coffee'); + } + var cucumberPath = 'cucumber'; if (! _.isEmpty(modulePath)) { cucumberPath = modulePath;