This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const spawn = require('child_process').spawn; | |
| const command = 'node'; | |
| const parameters = [path.resolve('program.js')]; | |
| const child = spawn(command, parameters, { | |
| stdio: [ 'pipe', 'pipe', 'pipe', 'ipc' ] | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (process.send) { | |
| process.send("Hello"); | |
| } | |
| process.on('message', message => { | |
| console.log('message from parent:', message); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fork = require('child_process').fork; | |
| const program = path.resolve('program.js'); | |
| const parameters = []; | |
| const options = { | |
| stdio: [ 'pipe', 'pipe', 'pipe', 'ipc' ] | |
| }; | |
| const child = fork(program, parameters, options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fork = require('child_process').fork; | |
| const program = path.resolve('other.js'); | |
| const child = fork(program, [], { | |
| silent: true | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fork = require('child_process').fork; | |
| const program = path.resolve('other.js'); | |
| const child = fork(program); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function ($) { | |
| var elements = { | |
| html: document.documentElement | |
| body: document.body | |
| }; | |
| $(elements.body).one('touchstart', function () { | |
| $(elements.body).off('mouseenter.cursor-detection'); | |
| }); | |
| $(elements.body).one('mouseenter.cursor-detection', function () { |
NewerOlder