From dd3dec1f9d241065600d6cf7968fc001d28eb6f2 Mon Sep 17 00:00:00 2001 From: bruce-one Date: Mon, 27 Sep 2021 04:37:29 +1000 Subject: [PATCH] docs: document asset option. (#903) --- README.md | 4 +++- src/compiler.ts | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dc226df..8338e4d 100644 --- a/README.md +++ b/README.md @@ -118,8 +118,10 @@ compile({ - #### `build: boolean` - Build node from source, passing this flag tells nexe to download and build from source. Subsequently using this flag will cause nexe to use the previously built binary. To rebuild, first add [`--clean`](#clean-boolean) - #### `remote: string` - - Provide a custom remote location for fetching pre-built nexe binaries from. This can either be an HTTP or HTTPS URL or a file path. + - Provide a custom remote location for fetching pre-built nexe binaries from. This can either be an HTTP or HTTPS URL. - default: `null` + - #### `asset: string` + - Provide a pre-built nexe binary asset, this is a file path is resolved relative to cwd. - #### `python: string` - On Linux this is the path pointing to your python2 executable - On Windows this is the directory where `python` can be accessed diff --git a/src/compiler.ts b/src/compiler.ts index f33014e..0117ad9 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -111,9 +111,7 @@ export class NexeCompiler { this.targets = options.targets as NexeTarget[] this.target = this.targets[0] if (!/https?\:\/\//.test(options.remote)) { - throw new NexeError( - `Invalid remote URI scheme (must be http, https, or file): ${options.remote}` - ) + throw new NexeError(`Invalid remote URI scheme (must be http or https): ${options.remote}`) } this.remoteAsset = options.remote + this.target.toString() this.src = join(this.options.temp, this.target.version)