1. Kenneth Jørgensen
  2. grunt-jessie

Commits

Kenneth Jørgensen  committed b97d22a

Fixed jessie binary path resolution

  • Participants
  • Parent commits 95d7b13
  • Branches default
  • Tags 0.0.2

Comments (0)

Files changed (4)

File CHANGELOG.md

View file
 # Changelog
 
-## 0.0.1 (dev)
+## 0.0.2 (2013-07-23)
+* Fixed Jessie binary path resolution.
+
+## 0.0.1 (2013-07-23)
 * Initial version.

File package.json

View file
 {
 	"fullname": "Jessie Grunt task",
 	"name": "grunt-jessie",
-	"version": "0.0.1",
+	"version": "0.0.2",
 	"description": "Grunt task for running Jasmine tests via Jessie.",
 	"keywords": ["jasmine", "jessie", "grunt", "gruntplugin"],
 	"homepage": "https://bitbucket.org/kennethjor/grunt-jessie",

File src/jessie.coffee

View file
-exec = require("child_process").exec
 spawn = require("child_process").spawn
+path = require "path"
 
-JESSIE_BIN = "#{__dirname}/../node_modules/jessie/bin/jessie"
+# Meh.
+JESSIE_BIN = require.resolve("jessie") + "../../../bin/jessie"
+JESSIE_BIN = path.normalize JESSIE_BIN
 
 # Jessie task.
 module.exports = (grunt) ->

File tasks/jessie.js

View file
 (function() {
-  var JESSIE_BIN, exec, spawn;
-
-  exec = require("child_process").exec;
+  var JESSIE_BIN, path, spawn;
 
   spawn = require("child_process").spawn;
 
-  JESSIE_BIN = "" + __dirname + "/../node_modules/jessie/bin/jessie";
+  path = require("path");
+
+  JESSIE_BIN = require.resolve("jessie") + "../../../bin/jessie";
+
+  JESSIE_BIN = path.normalize(JESSIE_BIN);
+
+  console.log(JESSIE_BIN);
 
   module.exports = function(grunt) {
     return grunt.registerMultiTask("jessie", "Runs Jasmine specs with Jessie", function() {