From 94711b98673f64441cd08f624c802e13ee9abe85 Mon Sep 17 00:00:00 2001 From: Dmitriy Stepanov Date: Tue, 27 Mar 2018 12:38:48 +0300 Subject: [PATCH 1/4] feature(slimerjs): up slimerjs to version 1.0.0 --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 99f50b9..6bccb7f 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,7 @@ "slimerjs" ], "author": "Nicolas Froidure ", - "dependencies": { - "slimerjs": "~0.906.1" - }, + "dependencies": {}, "peerDependencies": { "karma": ">=0.9" }, @@ -34,7 +32,8 @@ "grunt-conventional-github-releaser": "^0.5.0", "grunt-eslint": "^17.2.0", "grunt-npm": "^0.0.2", - "load-grunt-tasks": "^3.3.0" + "load-grunt-tasks": "^3.3.0", + "slimerjs": "^1.0.0" }, "contributors": [ "Friedel Ziegelmayer ", From 2085c967dc20af12e8e77226de8562914d44eb62 Mon Sep 17 00:00:00 2001 From: Dmitriy Stepanov Date: Tue, 27 Mar 2018 12:38:55 +0300 Subject: [PATCH 2/4] 2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6bccb7f..9ec2202 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "karma-slimerjs-launcher", - "version": "1.1.0", + "version": "2.0.0", "description": "A Karma plugin. Launcher for SlimerJS.", "main": "index.js", "scripts": { From 583d03bae3caa48db5e06d8527c774a2607ef187 Mon Sep 17 00:00:00 2001 From: Dmitriy Stepanov Date: Tue, 27 Mar 2018 12:42:37 +0300 Subject: [PATCH 3/4] chore(slimerjs): fix deps --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9ec2202..a4f1be5 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "slimerjs" ], "author": "Nicolas Froidure ", - "dependencies": {}, + "dependencies": { + "slimerjs": "^1.0.0" + }, "peerDependencies": { "karma": ">=0.9" }, @@ -32,8 +34,7 @@ "grunt-conventional-github-releaser": "^0.5.0", "grunt-eslint": "^17.2.0", "grunt-npm": "^0.0.2", - "load-grunt-tasks": "^3.3.0", - "slimerjs": "^1.0.0" + "load-grunt-tasks": "^3.3.0" }, "contributors": [ "Friedel Ziegelmayer ", From 7a36cbd02ac78d9a0d5f68b9a34f2878259f060e Mon Sep 17 00:00:00 2001 From: Dmitriy Stepanov Date: Tue, 27 Mar 2018 14:42:14 +0300 Subject: [PATCH 4/4] chore(window): remove windows shim --- index.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/index.js b/index.js index a89850f..5bdcdd0 100644 --- a/index.js +++ b/index.js @@ -8,28 +8,6 @@ function serializeOption (value) { return JSON.stringify(value) } -var slimerDir = function () { - var slimerSource = require('slimerjs').path - return path.dirname(slimerSource) -} - -var slimerJSExePath = function () { - return path.join(slimerDir(), '/xulrunner/xulrunner.exe') -} - -var isWindows = function () { - return /^win/.test(process.platform) -} - -var windowsFlags = function (tempDir) { - return [ - '-app', path.join(slimerDir(), '/application.ini'), - '-profile', path.join(tempDir, '/slimerjs-profile'), - '-attach-console', - '-no-remote' - ] -} - var SlimerJSBrowser = function (baseBrowserDecorator, config, args) { baseBrowserDecorator(this) @@ -55,7 +33,6 @@ var SlimerJSBrowser = function (baseBrowserDecorator, config, args) { optionsCode.join('\n') + '\npage.open("' + url + '");\n' fs.writeFileSync(captureFile, captureCode) - if (isWindows()) flags = flags.concat(windowsFlags(this._tempDir)) flags = flags.concat(captureFile) // Start SlimerJS @@ -69,7 +46,7 @@ SlimerJSBrowser.prototype = { DEFAULT_CMD: { linux: require('slimerjs').path, darwin: require('slimerjs').path, - win32: slimerJSExePath() + win32: path.join(path.dirname(require('slimerjs').path), '/slimerjs.bat') }, ENV_CMD: 'SLIMERJS_BIN' }