ewvjs-cli 1.0.0 ā 1.0.3
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/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm install -g ewvjs-cli
|
|
|
11
11
|
Or use with npx:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx ewvjs-cli
|
|
14
|
+
npx ewvjs-cli --help
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
@@ -19,32 +19,26 @@ npx ewvjs-cli ewv --help
|
|
|
19
19
|
### List available templates
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
22
|
+
ewvjs-cli init --list-templates
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Initialize a new ewvjs project
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
|
|
28
|
+
ewvjs-cli init my-app
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
With a specific template:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
# Minimal template (simple Hello World)
|
|
35
|
-
ewv init my-app --template minimal
|
|
36
|
-
|
|
37
34
|
# Basic template (default - interactive with APIs)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# Advanced template (multiple windows, file operations)
|
|
41
|
-
ewv init my-app --template advanced
|
|
35
|
+
ewvjs-cli init my-app --template basic
|
|
42
36
|
```
|
|
43
37
|
|
|
44
38
|
### Package your application
|
|
45
39
|
|
|
46
40
|
```bash
|
|
47
|
-
|
|
41
|
+
ewvjs-cli package app.js -o myapp -n "My Application"
|
|
48
42
|
```
|
|
49
43
|
|
|
50
44
|
#### Options
|
|
@@ -62,7 +56,7 @@ ewv package app.js -o myapp -n "My Application"
|
|
|
62
56
|
|
|
63
57
|
```bash
|
|
64
58
|
# Create a new project
|
|
65
|
-
|
|
59
|
+
ewvjs-cli init my-awesome-app
|
|
66
60
|
cd my-awesome-app
|
|
67
61
|
|
|
68
62
|
# Install dependencies
|
|
@@ -72,30 +66,12 @@ npm install
|
|
|
72
66
|
npm start
|
|
73
67
|
|
|
74
68
|
# Create with a specific template
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
# Create an advanced app
|
|
78
|
-
ewv init pro-app --template advanced
|
|
69
|
+
ewvjs-cli init simple-app --template basic
|
|
79
70
|
|
|
80
71
|
# Package for distribution
|
|
81
|
-
|
|
72
|
+
ewvjs-cli package app.js -o MyAwesomeApp -n "My Awesome App" -i icon.ico --compress
|
|
82
73
|
```
|
|
83
74
|
|
|
84
|
-
## Templates
|
|
85
|
-
|
|
86
|
-
ewvjs-cli includes three project templates:
|
|
87
|
-
|
|
88
|
-
### minimal
|
|
89
|
-
A simple "Hello World" template - perfect for quick testing.
|
|
90
|
-
|
|
91
|
-
### basic (default)
|
|
92
|
-
Interactive application with exposed Node.js functions and a polished UI.
|
|
93
|
-
|
|
94
|
-
### advanced
|
|
95
|
-
Comprehensive template with multiple windows, file operations, and external assets.
|
|
96
|
-
|
|
97
|
-
Use `ewv init --list-templates` to see all available templates.
|
|
98
|
-
|
|
99
75
|
## License
|
|
100
76
|
|
|
101
77
|
MIT
|
package/lib/packager.js
CHANGED
|
@@ -123,7 +123,7 @@ function runPkg(args) {
|
|
|
123
123
|
* @param {string} config.icon - Icon file path (.ico)
|
|
124
124
|
* @param {string} config.name - Application name
|
|
125
125
|
* @param {string} config.target - Target platform (e.g., node18-win-x64)
|
|
126
|
-
* @param {boolean} config.compress - Whether to compress
|
|
126
|
+
* @param {boolean} config.compress - Whether to compress the executable
|
|
127
127
|
* @param {boolean} config.includeNative - Whether to include native DLLs
|
|
128
128
|
* @param {string[]} config.additionalModules - Additional node modules to bundle
|
|
129
129
|
*/
|
|
@@ -318,6 +318,10 @@ async function packageApp(config) {
|
|
|
318
318
|
console.log('\nšØ Step 4: Setting application icon...');
|
|
319
319
|
await setIcon(outputPath, icon, name);
|
|
320
320
|
console.log(' ā Icon applied');
|
|
321
|
+
} else if (name) {
|
|
322
|
+
console.log('\nšØ Step 4: Setting application name...');
|
|
323
|
+
await setIcon(outputPath, null, name);
|
|
324
|
+
console.log(' ā Name applied');
|
|
321
325
|
}
|
|
322
326
|
|
|
323
327
|
// Step 5: Create ZIP archive
|
package/package.json
CHANGED
package/templates/basic/app.js
CHANGED
|
@@ -15,7 +15,7 @@ expose('getSystemInfo', () => {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
// Create main window
|
|
18
|
-
const window = create_window('Hello ewvjs', `file://${path.resolve('index.html')}`, {
|
|
18
|
+
const window = create_window('Hello ewvjs', `file://${path.resolve('assets/index.html')}`, {
|
|
19
19
|
width: 800,
|
|
20
20
|
height: 600,
|
|
21
21
|
vibrancy: true,
|
|
File without changes
|