If the script imports init.js and the scripts that needs to terminate after execution, you need to have process.env.NODE_ENV set to production otherwise the whole script runs in watch mode.
If the script imports init.js and the scripts that needs to terminate after execution, you need to have process.env.NODE_ENV set to production otherwise the whole script runs in watch mode.