Trying to avoid child_process
to spawn a new process to execute javascript file in gulp as below.
var count = 0;
function run() {
SystemJS.defaultJSExtensions = true;
//./src/main or any of its dependencies may change in subsequent calls e.g. gulp.watch
SystemJS.import('./src/main').then(function (main) {
count++;
console.log(count+'Running ----------------- main -------------');
main.main("main from gulp");
console.log(count+'Done ----------------- main -------------');
}).catch(function(e){
console.error(e);
});
}
In subsequent run()
my `src\main' or its subsequent child imports may have changed and so I would like it to reload.
Tried System.delete as per artem but no luck
file:///C:/Users/SSSSSSSS/projs/DDDDDDDD/e2e/src/main.js
Any ideas ?