nesh icon indicating copy to clipboard operation
nesh copied to clipboard

Implement autoreloading on module change

Open dbkaplun opened this issue 10 years ago • 2 comments

See otra-vez for a Node shell that does this.

dbkaplun avatar Nov 01 '14 22:11 dbkaplun

This looks pretty cool. +1 for adding this to nesh, and it could be a built-in plugin so long as it doesn't introduce a bunch of dependencies.

Question - if I run otra file1.js and in file1 I require('file2') and then update file2 - does otra pick up the change?

danielgtaylor avatar Nov 02 '14 05:11 danielgtaylor

Otra currently only hooks into require calls directly in the REPL, but that's something we could add.

Edit: see quarterto/otra-vez#3.

Currently otra-vez only exports the REPL, I've filed quarterto/otra-vez#4 to split it up. The only dependency the require portion has is clear-require, which is pretty small.

apaleslimghost avatar Nov 02 '14 09:11 apaleslimghost