chore: docs and ts fixes
This commit is contained in:
Vendored
+4
-1
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"typescript.tsdk": "./node_modules/typescript/lib"
|
||||
"typescript.tsdk": "./node_modules/typescript/lib",
|
||||
"prettier.semi": false,
|
||||
"prettier.singleQuote": true,
|
||||
"prettier.typescriptEnable": ["typescript"]
|
||||
}
|
||||
|
||||
@@ -78,73 +78,73 @@ nexe.compile({
|
||||
|
||||
### `options`
|
||||
|
||||
- `build: boolean`
|
||||
- #### `build: boolean`
|
||||
- Build node from source (required in beta)
|
||||
- `input: string`
|
||||
- #### `input: string`
|
||||
- Input bundle file path
|
||||
- default: stdin or the current directory's main file (package.json)
|
||||
- `output: string`
|
||||
- #### `output: string`
|
||||
- Output executable file path
|
||||
- default: same as `name` with an OS specific extension.
|
||||
- `target: string`
|
||||
- #### `target: string`
|
||||
- Dash seperated platform-architecture-version. e.g. `'win32-ia32-6.10.3'`
|
||||
- default: `[process.platform, process.arch, process.version.slice(1)].join('-')`
|
||||
- `name: string`
|
||||
- #### `name: string`
|
||||
- Module friendly name of the application
|
||||
- default: basename of the input file, or `nexe_${Date.now()}`
|
||||
- `version: string`
|
||||
- #### `version: string`
|
||||
- The Node version you're building for
|
||||
- default: `process.version.slice(1)`
|
||||
- `python: string`
|
||||
- #### `python: string`
|
||||
- On Linux this is the path pointing to your python2 executable
|
||||
- On Windows this is the directory where `python` can be accessed
|
||||
- default: `null`
|
||||
- `flags: Array<string>`
|
||||
- #### `flags: Array<string>`
|
||||
- Array of node runtime flags to build node with.
|
||||
- Example: `['--expose-gc']`
|
||||
- default: `[]`
|
||||
- `configure: Array<string>`
|
||||
- #### `configure: Array<string>`
|
||||
- Array of arguments for the node build configure step
|
||||
- Example: `['--with-dtrace', '--dest-cpu=x64']`
|
||||
- default: `[]`
|
||||
- `make: Array<string>`
|
||||
- #### `make: Array<string>`
|
||||
- Array of arguments for the node build make step
|
||||
- default: `[]`
|
||||
- `vcBuild: Array<string>`
|
||||
- #### `vcBuild: Array<string>`
|
||||
- Array of arguments for the node build step on windows
|
||||
- default: `['nosign', 'release']`
|
||||
- `snapshot: string`
|
||||
- #### `snapshot: string`
|
||||
- path to a file to be used as the warmup snapshot for the build
|
||||
- default: `null`
|
||||
- `resources: Array<string>`
|
||||
- #### `resources: Array<string>`
|
||||
- Array of globs with files to include in the build
|
||||
- Example: `['./public/**/*']`
|
||||
- default: `[]`
|
||||
- `temp: string`
|
||||
- #### `temp: string`
|
||||
- Path to use for storing nexe's build files
|
||||
- Override in the env with `NEXE_TEMP`
|
||||
- default: `./.nexe` in the cwd
|
||||
- `ico: string`
|
||||
- #### `ico: string`
|
||||
- Path to a user provided icon to be used (Windows only).
|
||||
- `rc: object`
|
||||
- #### `rc: object`
|
||||
- Settings for patching the [node.rc](https://github.com/nodejs/node/blob/master/src/res/node.rc) configuration file (Windows only).
|
||||
- Example: `{ CompanyName: "ACME Corp" }`
|
||||
- default: `{}`
|
||||
- `clean: boolean`
|
||||
- #### `clean: boolean`
|
||||
- If included, nexe will remove temporary files for accompanying configuration and exit
|
||||
- `enableNodeCli: boolean`
|
||||
- #### `enableNodeCli: boolean`
|
||||
- Enable the original Node CLI (will prevent application cli from working)
|
||||
- default: `false`
|
||||
- `sourceUrl: string`
|
||||
- #### `sourceUrl: string`
|
||||
- Provide an alternate url for the node source. Should be a `.tar.gz`
|
||||
- `loglevel: string`
|
||||
- #### `loglevel: string`
|
||||
- Set the loglevel, info, silent, or verbose
|
||||
- default: `'info'`
|
||||
- `padding`
|
||||
- #### `padding`
|
||||
- Advanced option for controlling the size available in the executable.
|
||||
- It must be larger than the bundle + resources in bytes
|
||||
- default: 3, 6, 9, 16, 25, or 40 MB sizes are selected automatically.
|
||||
- `patches: Array<NexePatch>`
|
||||
- #### `patches: Array<NexePatch>`
|
||||
- Userland patches for patching or modifying node source
|
||||
- default: `[]`
|
||||
|
||||
|
||||
+6
-4
@@ -2,17 +2,17 @@
|
||||
"name": "nexe",
|
||||
"description": "Create a single executable out of your Node.js application",
|
||||
"license": "MIT",
|
||||
"version": "2.0.0-beta.2",
|
||||
"version": "2.0.0-beta.3",
|
||||
"contributors": [
|
||||
"Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)",
|
||||
"Jared Allard <jaredallard@outlook.com>",
|
||||
"Caleb Boyd <caleb.boyd@hotmail.com>"
|
||||
],
|
||||
"scripts": {
|
||||
"prebuild": "npm run clean",
|
||||
"prebuild": "rimraf lib && npm run lint",
|
||||
"prepublish": "npm run build",
|
||||
"clean": "rimraf lib",
|
||||
"build": "prettier --parser typescript --no-semi --print-width 100 --single-quote --write \"src/**/*.ts\" && tsc --declaration"
|
||||
"lint": "prettier --parser typescript --no-semi --print-width 100 --single-quote --write \"src/**/*.ts\"",
|
||||
"build": "tsc --declaration"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -45,6 +45,8 @@
|
||||
"devDependencies": {
|
||||
"@types/bluebird": "^3.5.8",
|
||||
"@types/chalk": "^0.4.31",
|
||||
"@types/globby": "^0.6.0",
|
||||
"@types/minimist": "^1.2.0",
|
||||
"@types/mkdirp": "^0.3.29",
|
||||
"@types/ora": "^0.3.31",
|
||||
"@types/rimraf": "0.0.28",
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { createWriteStream, chmodSync } from 'fs'
|
||||
import { readFileAsync, dequote, isWindows } from './util'
|
||||
import { NexeCompiler } from './compiler'
|
||||
|
||||
function readStreamAsync(stream: NodeJS.ReadStream): PromiseLike<string> {
|
||||
function readStreamAsync(stream: NodeJS.ReadableStream): PromiseLike<string> {
|
||||
return new Bluebird(resolve => {
|
||||
let input = ''
|
||||
stream.setEncoding('utf-8')
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ function fetchNodeSourceAsync(cwd: string, url: string, step: LogStep, options =
|
||||
const setText = (p: number) => step.modify(`Downloading Node: ${p.toFixed()}%...`)
|
||||
return download(url, cwd, Object.assign(options, { extract: true, strip: 1 }))
|
||||
.on('response', (res: IncomingMessage) => {
|
||||
const total = +res.headers['content-length']
|
||||
const total = +res.headers['content-length']!
|
||||
let current = 0
|
||||
res.on('data', data => {
|
||||
current += data.length
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ function extractName(options: NexeOptions) {
|
||||
}
|
||||
|
||||
function normalizeOptionsAsync(input: Partial<NexeOptions>) {
|
||||
if (argv.help || argv._.some(x => x === 'version')) {
|
||||
if (argv.help || argv._.some((x: string) => x === 'version')) {
|
||||
process.stderr.write(argv.help ? help : '2.0.0-beta.1' + EOL, () => process.exit(0))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user