patrick-steele-idem / browser-refresh

Node.js module to enable server restart and browser refresh in response to file modifications
110 stars 18 forks source link

Using iojs instead of node #3

Closed Solido closed 6 years ago

Solido commented 9 years ago

I understand that Browser-refresh exec replace the command line and defer to node. Is it possible to use iojs instead without having to rename it to node ? a config where I can set the exec name.

Thank you.

patrick-steele-idem commented 9 years ago

There are a few small challenges:

  1. The browser-refresh executable script is hard code to launch with node via the following line: https://github.com/patrick-steele-idem/browser-refresh/blob/76291efe4402837e808d25644806241e0ef0f88a/bin/browser-refresh#L1
  2. The browser-refresh module uses require('child_process').fork which spawns the child process using the same Node.js runtime engine that browser-refresh was launched with.

I think an acceptable solution would be to register a browser-refresh-iojs script in addition to the existing browser-refresh script.

Then, you can alias browser-refresh-iojs to browser-refresh or something else in your environment.

Pull Request welcome :)

mlrawlings commented 8 years ago

@patrick-steele-idem I think this can be closed since iojs has been reconciled with node.