Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
spawn-auto-restart
Advanced tools
Important: Use it for dev only!
It executes a command through spawn
and restart the process in case any change has been detected or the child process has crashed.
Install via npm:
$ npm install spawn-auto-restart
require('spawn-auto-restart')({
proc: 'executable path',
watch: __dirname
});
To enable logs set an environment variable like this:
DEBUG=spawn-auto-restart
advanced args options
require('spawn-auto-restart')({
proc: {
command: 'executable path',
// ... any spawn argument
args: ['--dev'],
cwd: __dirname
},
watch: {
path: 'file, dir, glob, or array',
// ... any chokidar argument
ignored: /[\/\\]\./,
persistent: true
}
});
Auto restarting an electron app in development when changes have been applied in the main process.
node DEBUG=spawn-auto-restart restart.js
#!/usr/bin/env node
var join = require('path').join;
var electron = require('electron-prebuilt');
var main = join(__dirname, '../src/browser/main.js');
var watch = join(__dirname, '../src/browser');
require('spawn-auto-restart')({
proc: {
command: electron,
args: main
},
watch: watch
});
It is required to use editorconfig.
Copyright (c) 2015 Max Claus Nunes. This software is licensed under the MIT License.
FAQs
spawn-auto-restart
We found that spawn-auto-restart demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.