From fcd803686cd2e27c84902e045b1c04625626926b Mon Sep 17 00:00:00 2001 From: calebboyd Date: Wed, 23 Aug 2017 23:33:11 -0500 Subject: [PATCH] chore: test appveyor build --- appveyor.yml | 25 +++++++++++++++++++++++++ package.json | 2 ++ src/compiler.ts | 3 +++ src/options.ts | 3 ++- 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..a43a011 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,25 @@ +environment: + node_version: "6" + +branches: + except: + - master + +install: + - ps: Install-Product node $env:node_version + - npm i + +build: off +test: off + +before_build: + - npm run log-node-version + +build_script: + - npm run task-build-windows + +artifacts: + - path: .nexe\6.11.2\Release\node.exe + +cache: + - node_modules diff --git a/package.json b/package.json index e6f622b..35e24da 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "Caleb Boyd " ], "scripts": { + "task-build-windows": "node -e \"require('.').compile({ empty: true })\"", + "log-node-version": "node -e \"console.log([process.platform, process.arch, process.version.slice(1)].join('-'))\"", "prebuild": "rimraf lib && npm run lint", "prepublish": "npm run build", "lint": "prettier --parser typescript --no-semi --print-width 100 --single-quote --write \"src/**/*.ts\"", diff --git a/src/compiler.ts b/src/compiler.ts index 56a42a8..06f27bb 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -172,6 +172,9 @@ export class NexeCompiler { } private _assembleDeliverable(header: NexeHeader, binary: NodeJS.ReadableStream) { + if (this.options.empty) { + return binary + } const artifact = new Readable({ read() {} }) binary.on('data', (chunk: Buffer) => { artifact.push(chunk) diff --git a/src/options.ts b/src/options.ts index b6a890d..1156451 100644 --- a/src/options.ts +++ b/src/options.ts @@ -71,6 +71,7 @@ export interface NexeOptions { function padRight(str: string, l: number) { return (str + ' '.repeat(l)).substr(0, l) } + const defaults = { temp: process.env.NEXE_TEMP || join(process.cwd(), '.nexe'), version: process.version.slice(1), @@ -78,7 +79,7 @@ const defaults = { configure: [], make: [], targets: [], - vcBuild: ['nosign', 'release'], + vcBuild: ['nosign', 'release', process.arch], enableNodeCli: false, bundle: true, build: true,