GithubHelp home page GithubHelp logo

Comments (9)

jlbruno avatar jlbruno commented on July 17, 2024 5

orrr I could be way off and it was trying to call the command as 'npm instead of npm

:)

Still not sure if maybe it's a windows thing? Changed my package.json to this:

`"start": "parallelshell \"npm run watch:browser-sync\" \"npm run watch:sass\"",

and it seems to now call the tasks, but browser-sync doesn't seem to be working now dammit.

from parallelshell.

jlbruno avatar jlbruno commented on July 17, 2024

Wondering if it's related to this?
nodejs/node-v0.x-archive#2318

In this issue on grunt, they recommend using node-which
gruntjs/grunt#155
https://github.com/isaacs/node-which/

from parallelshell.

keithamus avatar keithamus commented on July 17, 2024

Hmm, that's irritating. Thanks for the issue @jlbruno. Looks like https://github.com/keithamus/parallelshell/blob/master/index.js#L14 needs to change from exec(childCmd to exec(isWin ? 'cmd' : 'sh'.... Or perhaps just depend on https://github.com/IndigoUnited/node-cross-spawn.

If you'd like to @jlbruno, a PR would be very much welcome. Otherwise I'll work on this over the weekend.

from parallelshell.

keithamus avatar keithamus commented on July 17, 2024

Ahh, interesting. I made the assumption single quotes would work in the Windows command line. Silly me.

I'll close this one for now then. If you want some help with npm scripts in general, I'm hanging out in https://gitter.im/keithamus/npm-run-scripts and can help πŸ˜„

from parallelshell.

dlockhart avatar dlockhart commented on July 17, 2024

I just ran into this same issue and switching from single to double quotes solved it for me on Windows. Lots of other issues with watch libraries like onchange and their handling of using child_process.spawn to run npm, but that's outside the scope of parallelshell. :)

from parallelshell.

jlbruno avatar jlbruno commented on July 17, 2024

Do the double quotes work on mac as well? If so, I'd be happy to send a PR to update the readme file with double instead of single quotes, but I have no mac to test on.

from parallelshell.

dlockhart avatar dlockhart commented on July 17, 2024

Double quotes do indeed work on Mac! :)

from parallelshell.

keithamus avatar keithamus commented on July 17, 2024

@jlbruno please feel free to send a PR updating to double quotes. They will work in bash, but it should be noted that they are interpreted for variables and globs (e.g. "*" is expanded before being passed, while '*' isn't).

from parallelshell.

olowoseun avatar olowoseun commented on July 17, 2024

I'll just stick to using double quotes whenever I'm working in a scripting environment on Windows! πŸ˜‰

from parallelshell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.