2017-02-28 17:08:36 +00:00
|
|
|
/* eslint-env node */
|
|
|
|
|
2017-02-24 23:50:17 +00:00
|
|
|
/**
|
|
|
|
* NodeRunner.js
|
|
|
|
*
|
|
|
|
* The purpose of this file is to execute via PhantomJS the file
|
|
|
|
* PhantomRunner.js, because PhantomJS is managed by node.
|
|
|
|
*
|
2017-02-28 17:08:36 +00:00
|
|
|
* @author tlwr [toby@toby.codes]
|
2017-02-24 23:50:17 +00:00
|
|
|
* @copyright Crown Copyright 2017
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2017-02-28 17:08:36 +00:00
|
|
|
var path = require("path"),
|
|
|
|
phantomjs = require("phantomjs-prebuilt"),
|
|
|
|
phantomEntryPoint = path.join(__dirname, "PhantomRunner.js"),
|
|
|
|
program = phantomjs.exec(phantomEntryPoint);
|
2017-02-24 23:50:17 +00:00
|
|
|
|
|
|
|
program.stdout.pipe(process.stdout);
|
|
|
|
program.stderr.pipe(process.stderr);
|
|
|
|
|
|
|
|
program.on("exit", function(status) {
|
|
|
|
process.exit(status);
|
|
|
|
});
|