darkguy2008 / parallelshell

Run multiple shell commands in parallel
501 stars 44 forks source link

cwd is a function, not a string #49

Closed kirbysayshi closed 7 years ago

kirbysayshi commented 8 years ago

I was looking through the source code, and saw what I believe are some typos! Not sure though. I'm guessing this has been working because perhaps internally the cwd argument is discarded if not a real path, such as [Function: cwd].

swashcap commented 7 years ago

@keithamus Any chance you could have a look and merge? parallelshell is broken on Node.js 8 because of this!

keithamus commented 7 years ago

Thanks @kirbysayshi and @swashcap. I'm no longer maintaining this library, (see the note in the docs). If either of you are really keen on continuing to use this, I'm more than happy to add either/both of you as maintainers to the project so you can merge and release this yourself.

swashcap commented 7 years ago

@keithamus Thanks! I went ahead and migrated to npm-run-all in the interest of that “canonical parallelisation tool.”

Here’s an abridged diff for folks stumbling on this PR:

diff --git a/package.json b/package.json
index b570f18..3b6b0df 100644
--- a/package.json
+++ b/package.json
@@ -40,3 +40,3 @@
     "mockery": "^2.0.0",
-    "parallelshell": "^2.0.0",
+    "npm-run-all": "^4.0.2",
     "pg": "^6.1.5",
@@ -81,6 +81,7 @@
   "scripts": {
-    "build:assets": "node scripts/html-min.js 'dist/**/*.html' && parallelshell 'npm run build:css' 'npm run build:js' && npm run build:rev",
+    "build:assets": "node scripts/html-min.js 'dist/**/*.html' && run-p build:css build:js && npm run build:rev",
     "build:components": "cross-env BLUEBIRD_WARNINGS=0 node scripts/statistics.js && node scripts/auth-components.js",
-    "build:copy": "parallelshell 'npm run build:copy:gridexpander' 'npm run build:copy:images'",
+    "build:copy": "run-p build:copy:*",
     "build:copy:gridexpander": "mkdirp dist/js/grid-expander && cp -r app/js/grid-expander dist/js",
@@ -95,5 +96,6 @@
     "lint": "eslint *.js app/js/login-help.js app/js/auth/ scripts test",
-    "start": "npm run build:copy && parallelshell 'npm run watch' 'browser-sync start --config .bs-config.js'",
-    "test": "parallelshell 'npm run test:unit' 'npm run test:integration' 'npm run test:e2e'",
-    "test:e2e": "npm run build && parallelshell 'http-server dist -s -p 4001' 'wdio wdio.conf.js'",
+    "start": "npm run build:copy && run-p watch browserSync",
+    "test": "run-p test:unit test:integration test:e2e",
+    "test:e2e": "npm run build && run-p server webdriver",
     "test:integration": "testem ci -P 6",
@@ -103,6 +105,7 @@
     "test:watch": "testem",
-    "watch": "parallelshell 'npm run watch:css' 'npm run watch:jekyll' 'npm run watch:js'",
+    "watch": "run-p watch:*",
     "watch:css": "npm run build:css:init -- --watch",
darkguy2008 commented 7 years ago

For those interested, @keithamus allowed me to apply a fix for node >= 8 and it's live in the master branch 👍