docs: document asset option. (#903)

This commit is contained in:
bruce-one
2021-09-27 04:37:29 +10:00
committed by GitHub
parent fe9f73d22b
commit dd3dec1f9d
2 changed files with 4 additions and 4 deletions
+3 -1
View File
@@ -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
+1 -3
View File
@@ -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)