@utoo/pack-cli 1.1.21-rc.2 → 1.1.22
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 +35 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,25 +5,49 @@
|
|
|
5
5
|
## 📦 Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
ut install @utoo/pack-cli --save-dev
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## 🚀 Usage
|
|
12
12
|
|
|
13
|
+
### Config setup
|
|
14
|
+
|
|
15
|
+
Add a `utoopack.json` config file in the root directory:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"$schema": "@utoo/pack/config_schema.json",
|
|
20
|
+
"entry": [
|
|
21
|
+
{
|
|
22
|
+
"import": "./src/index.ts",
|
|
23
|
+
"html": {
|
|
24
|
+
"template": "./index.html"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"output": {
|
|
29
|
+
"path": "./dist",
|
|
30
|
+
"filename": "[name].[contenthash:8].js",
|
|
31
|
+
"chunkFilename": "[name].[contenthash:8].js",
|
|
32
|
+
"clean": true
|
|
33
|
+
},
|
|
34
|
+
"sourceMaps": true
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
13
38
|
### Development Mode
|
|
14
39
|
|
|
15
40
|
Start the development server with Hot Module Replacement (HMR):
|
|
16
41
|
|
|
17
42
|
```bash
|
|
18
|
-
up dev
|
|
43
|
+
utx up dev
|
|
19
44
|
```
|
|
20
45
|
|
|
21
46
|
### Production Build
|
|
22
47
|
|
|
23
48
|
Build your project for production:
|
|
24
|
-
|
|
25
49
|
```bash
|
|
26
|
-
up build
|
|
50
|
+
utx up build
|
|
27
51
|
```
|
|
28
52
|
|
|
29
53
|
### Webpack Compatibility Mode
|
|
@@ -31,16 +55,18 @@ up build
|
|
|
31
55
|
If you have an existing `webpack.config.js`, you can run `@utoo/pack` in compatibility mode:
|
|
32
56
|
|
|
33
57
|
```bash
|
|
34
|
-
up build --webpack
|
|
58
|
+
utx up build --webpack
|
|
35
59
|
# or
|
|
36
|
-
up dev --webpack
|
|
60
|
+
utx up dev --webpack
|
|
37
61
|
```
|
|
38
62
|
|
|
39
63
|
## 🛠️ Commands
|
|
40
64
|
|
|
41
|
-
- `up dev`: Start development server.
|
|
42
|
-
- `up build`: Build for production.
|
|
43
|
-
- `up help`: Show help for all commands.
|
|
65
|
+
- `utx up dev`: Start development server.
|
|
66
|
+
- `utx up build`: Build for production.
|
|
67
|
+
- `utx up help`: Show help for all commands.
|
|
68
|
+
|
|
69
|
+
You can see [examples/*](../../examples/) for more usage scenarios.
|
|
44
70
|
|
|
45
71
|
## 📄 License
|
|
46
72
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utoo/pack-cli",
|
|
3
3
|
"description": "Utoo pack cli",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.22",
|
|
5
5
|
"author": "xusd320",
|
|
6
6
|
"bin": {
|
|
7
7
|
"up": "./bin/run.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@oclif/core": "^4",
|
|
11
|
-
"@utoo/pack": "1.1.
|
|
11
|
+
"@utoo/pack": "1.1.22"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/node": "^20.3.0",
|