Comparing version 0.85.0-3-sdk to 0.85.0-4-sdk
{ | ||
"name": "nw", | ||
"version": "0.85.0-3-sdk", | ||
"version": "0.85.0-4-sdk", | ||
"description": "An installer for nw.js", | ||
@@ -12,3 +12,3 @@ "repository": { | ||
"bin": { | ||
"nw": "bin/nw.js" | ||
"nw": "src/cli.js" | ||
}, | ||
@@ -38,2 +38,3 @@ "scripts": { | ||
"axios": "^1.6.8", | ||
"commander": "^12.0.0", | ||
"semver": "^7.5.4", | ||
@@ -40,0 +41,0 @@ "tar": "^6.2.1", |
@@ -81,19 +81,2 @@ # nw | ||
## Command Line Options | ||
There are a few (platform-specific) arguments you can pass to the `nw` executable to customize your nw.js application: | ||
* `--mac_plist <path-to-plist-file>`: (OS X only) Copies the given file to Info.plist in the app | ||
bundle. This lets you do things like change your app's name and point to a different icon. | ||
* `--mac_icon <path-to-icns-file>`: (OS X only) Copies the given .icns file to the Resources/ dir | ||
in the app bundle. You will need to point to the file with a custom plist file as well (see | ||
`--mac_list`) | ||
**NOTE**: These options will keep the copied files in the app bundle for as long as the bundle is | ||
on the filesystem (they're not deleted between app invocations). As a result, they're not | ||
recommended if you installed nw globally using `-g`. Also note that | ||
[OS X caches these files](http://proteo.me.uk/2011/08/mac-application-bundle-caching/), | ||
so you may need to manually clear these cached files during development. | ||
## APIs | ||
@@ -100,0 +83,0 @@ |
import get from './get.js'; | ||
import run from './run'; | ||
import util from './util.js'; | ||
@@ -9,2 +10,3 @@ | ||
get, | ||
run, | ||
} |
@@ -16,4 +16,2 @@ import child_process from "node:child_process"; | ||
* @property {string} [cacheDir = "./cache"] Cache directory | ||
* @property {boolean} [glob = false] If true, throw error | ||
* @property {string[]} [argv = []] CLI arguments | ||
*/ | ||
@@ -35,7 +33,6 @@ | ||
arch = util.ARCH_KV[process.arch], | ||
srcDir = "./src", | ||
srcDir = ".", | ||
cacheDir = "./cache", | ||
glob = false, | ||
argv = [], | ||
}) { | ||
try { | ||
@@ -45,5 +42,2 @@ if (util.EXE_NAME[platform] === undefined) { | ||
} | ||
if (glob === true) { | ||
throw new Error("Globbing is not supported with run mode."); | ||
} | ||
@@ -56,10 +50,5 @@ const nwDir = path.resolve( | ||
return new Promise((res, rej) => { | ||
// It is assumed that the package.json is located at srcDir/package.json | ||
const nwProcess = child_process.spawn( | ||
path.resolve(nwDir, util.EXE_NAME[platform]), | ||
[...[srcDir], ...argv], | ||
{ | ||
detached: true, | ||
windowsHide: true, | ||
}, | ||
[srcDir] | ||
); | ||
@@ -66,0 +55,0 @@ |
@@ -11,3 +11,3 @@ import fs from 'node:fs'; | ||
* | ||
* @param {NodeJS.fs.} filePath - File path to check existence of | ||
* @param {fs.PathLike} filePath - File path to check existence of | ||
* @return {Promise<boolean>} `true` if exists, otherwise `false` | ||
@@ -14,0 +14,0 @@ */ |
33184
6
799
124
34
+ Addedcommander@^12.0.0
+ Addedcommander@12.1.0(transitive)