diff --git a/README.md b/README.md index 539b285..85f94ea 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ ## Usage -- Existing application bundle: +- Application entrypoint: - `nexe my-app-bundle.js -o my-app` + `nexe my-app.js` - stdin interface diff --git a/src/options.ts b/src/options.ts index 68b94a2..5beeb45 100644 --- a/src/options.ts +++ b/src/options.ts @@ -192,8 +192,8 @@ function normalizeOptionsAsync(input?: Partial): Promise Promise let value = options[key] const isVar = /^[A-Z_]+$/.test(value) value = isVar ? value : `"${value}"` - file.contents = file.contents.replace(new RegExp(`VALUE "${key}",*`), `VALUE "${key}", ${value}`) + file.contents = file.contents.replace( + new RegExp(`VALUE "${key}",*`), + `VALUE "${key}", ${value}` + ) }) - ;['PRODUCTVERSION', 'FILEVERSION'].forEach(x => { if (options[x]) { - file.contents = file.contents.replace(new RegExp(x + ' .*$', 'm'),`${x} ${options[x]}`) + file.contents = file.contents.replace(new RegExp(x + ' .*$', 'm'), `${x} ${options[x]}`) } }) diff --git a/src/steps/bundle.ts b/src/steps/bundle.ts index faf39fc..e2f9b3d 100644 --- a/src/steps/bundle.ts +++ b/src/steps/bundle.ts @@ -16,7 +16,7 @@ function createBundle(filename: string, options: { name: string; minify: any; cw } const fuse = FuseBox.init({ cache: false, - log: Boolean(process.env.NEXE_BUNDLE_DEBUG) || false, + log: Boolean(process.env.NEXE_BUNDLE_LOG) || false, homeDir: options.cwd, sourceMaps: false, writeBundles: false, @@ -54,7 +54,7 @@ export default async function bundle(compiler: NexeCompiler, next: any) { minify: compiler.options.compress }) - if (compiler.options.debugBundle) { + if ('string' === typeof compiler.options.debugBundle) { await writeFileAsync(compiler.options.debugBundle, compiler.input) } diff --git a/test.js b/test.js new file mode 100644 index 0000000..cea4f10 --- /dev/null +++ b/test.js @@ -0,0 +1 @@ +console.log('hello world')