diff --git a/README.md b/README.md index ad569a4..e2273ee 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Then add this line to your project's `grunt.js` gruntfile: ```javascript grunt.initConfig({ cucumberjs: { + executable: "../path/to/custom/cucumberjs", features: "path/to/features", steps: "path/to/step_definitions", tags: "@dev" diff --git a/grunt.js b/grunt.js index decabb7..d09460d 100644 --- a/grunt.js +++ b/grunt.js @@ -23,6 +23,7 @@ module.exports = function (grunt) { globals: {} }, cucumberjs: { + executable: "../node_modules/cucumber/lib/cucumber.js", /* Relative to /tasks folder */ features: "features", steps: "features/step_definitions" } diff --git a/package.json b/package.json index a8aa63c..cfba9c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name" : "grunt-cucumber", "description" : "Grunt task for running Cucumber.js", - "version" : "0.1.0", + "version" : "0.1.1", "homepage" : "https://github.com/s9tpepper/grunt-cucumber-js", "author" : { "name" : "Omar Gonzalez", diff --git a/tasks/cucumber-js-task.js b/tasks/cucumber-js-task.js index ff413fa..fa0ac0b 100644 --- a/tasks/cucumber-js-task.js +++ b/tasks/cucumber-js-task.js @@ -2,7 +2,8 @@ module.exports = function (grunt) { grunt.registerTask("cucumberjs", "Runs cucumber.js", function () { - var Cucumber = require('cucumber'); + var cucumberPath = grunt.config("cucumberjs.executable") || 'cucumber'; + var Cucumber = require(cucumberPath); var features = grunt.config("cucumberjs.features") || 'features'; var steps = grunt.config("cucumberjs.steps") || 'features/step_definitions';