Closed rristov60 closed 1 year ago
The way I do this is with nodemon. Add the following to package.json:
"scripts": {
"watch": "nodemon -e js,html,json --watch . -x \"rm -r /Users/$USER/.node-red/node_modules/@digitalnodecom/${PWD##*/} && npm install --prefix /Users/$USER/.node-red --save ./ --force && node-red\""
},
Awesome, exactly the same can be used here. I will just take a look how can we differentiate UNIX style OSes vs Windows, so Windows users don't have an issue with this.
@trajche Thank you for the code snippet! There is a new commit to the main, which adds nodemon
with your code for UNIX like systems. I will close this issue now and open a new one for development automation on Windows. Although the change is in the codebase, a separate release won't be created for this.
Currently devs don't really have the option to automatically deploy the changes they make to node-RED. They need to manually install the nodes with
npm install /PATH/TO/NODES/node-red-contrib-generic-s3
and then restart node-RED. It would be nice for addition ofnpm run dev
which will take care of this process automatically, perhaps even watch the files.