nw-builder 3.8.2-beta.3 → 4.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CHANGELOG.md +18 -0
- package/bin/nwbuild.js +39 -0
- package/dist/index.cjs +2573 -6
- package/docs/api.md +5 -0
- package/docs/getting-started.md +138 -0
- package/docs/index.md +12 -0
- package/index.js +3 -0
- package/lib/index.cjs +2 -238
- package/package.json +8 -6
- package/src/api/build.js +8 -0
- package/src/api/nwbuild.js +50 -0
- package/src/api/run.js +33 -0
- package/src/constants/Options.js +3 -2
- package/src/index.js +6 -16
- package/src/utilities/execute.js +18 -0
- package/src/utilities/getArchitecture.js +12 -0
- package/src/utilities/getNwPath.js +14 -0
- package/src/utilities/getPlatform.js +14 -0
- package/test/demo/index.js +8 -0
- package/test/demo/package.json +2 -1
- package/test/nwBuilder.cjs +0 -14
- package/bin/nwbuild.cjs +0 -146
- package/src/utilities/checkPkgOptions.js +0 -30
- package/src/utilities/detectCurrentPlatform.js +0 -24
- package/test/demo/index.cjs +0 -5
- package/test/unit/detectCurrentPlatform.test.js +0 -58
package/.github/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.0.0-rc.1]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Install `nw-install`
|
|
15
|
+
- Create new run mode in a separate function
|
|
16
|
+
- Call new run mode and build mode through `nwbuild` function
|
|
17
|
+
|
|
18
|
+
### Removed
|
|
19
|
+
|
|
20
|
+
- Remove `NwBuilder` from exports
|
|
21
|
+
|
|
22
|
+
## [3.8.2] - 2022-08-08
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- Support for multiple file paths in CLI
|
|
27
|
+
|
|
10
28
|
## [3.8.1] - 2022-07-18
|
|
11
29
|
|
|
12
30
|
### Changed
|
package/bin/nwbuild.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import yargs from "yargs/yargs";
|
|
4
|
+
import { hideBin } from "yargs/helpers";
|
|
5
|
+
|
|
6
|
+
import nwbuild from "../index.js";
|
|
7
|
+
|
|
8
|
+
const cli = yargs(hideBin(process.argv))
|
|
9
|
+
.version(false)
|
|
10
|
+
.command("[file(glob)] [options]")
|
|
11
|
+
.option("mode", {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "Choose between run and build mode",
|
|
14
|
+
demandOption: true,
|
|
15
|
+
})
|
|
16
|
+
.option("version", {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Version of NW.js you want to use.",
|
|
19
|
+
group: "Run API",
|
|
20
|
+
demandOption: true,
|
|
21
|
+
})
|
|
22
|
+
.option("flavour", {
|
|
23
|
+
type: "string",
|
|
24
|
+
description:
|
|
25
|
+
"sdk is recommended for development and normal is recommended for production.",
|
|
26
|
+
group: "Run API",
|
|
27
|
+
demandOption: true,
|
|
28
|
+
})
|
|
29
|
+
.option("outDir", {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Path to NW.js cache",
|
|
32
|
+
group: "Run API",
|
|
33
|
+
})
|
|
34
|
+
.parse();
|
|
35
|
+
|
|
36
|
+
nwbuild({
|
|
37
|
+
...cli,
|
|
38
|
+
files: cli._,
|
|
39
|
+
});
|