-
Notifications
You must be signed in to change notification settings - Fork 383
/
package.js
37 lines (32 loc) · 1.15 KB
/
package.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var nexe = require( 'nexe' );
var os = require( 'os' );
var nodeVersion = '4.4.4';
var commit = process.env.TRAVIS_COMMIT || process.env.APPVEYOR_REPO_COMMIT || 'local';
var platform = os.platform();
var extension = platform == 'win32' ? '.exe' : '';
var packageVersion = require( '../package.json' ).version;
if( process.version.indexOf( nodeVersion ) === -1 ) {
console.log( 'We only compile nexe on Node version: ', nodeVersion );
process.exit();
}
// Only include first seven for it to be unique
commit = commit.substr( 0, 7 );
var fileName = `build/deepstream.io${extension}`;
console.log( `Compiling: ${fileName}` );
nexe.compile({
"input": "start.js",
"output": fileName,
"nodeTempDir": "build/src",
"framework": "node",
"nodeVersion": nodeVersion,
"js-flags": "--use_strict",
nodeConfigureArgs: ['opt', 'val'], // for all your configure arg needs.
nodeMakeArgs: ["-j", "4"], // when you want to control the make process.
nodeVCBuildArgs: ["nosign", "x64"] // when you want to control the make process for windows.
}, function(err) {
if(err) {
return console.log(err);
process.exit( 1 );
}
console.log( 'Compile Complete' )
});