@utoo/pack-cli 1.1.1 → 1.1.6
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 +47 -0
- package/dist/utils/common.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1 +1,48 @@
|
|
|
1
|
+
# @utoo/pack-cli
|
|
2
|
+
|
|
3
|
+
> 🌖 Command-line interface for `@utoo/pack`, the high-performance bundler powered by [Turbopack](https://turbo.build/pack).
|
|
4
|
+
|
|
5
|
+
## 📦 Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @utoo/pack-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 🚀 Usage
|
|
12
|
+
|
|
13
|
+
### Development Mode
|
|
14
|
+
|
|
15
|
+
Start the development server with Hot Module Replacement (HMR):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
utoopack dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Production Build
|
|
22
|
+
|
|
23
|
+
Build your project for production:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
utoopack build
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Webpack Compatibility Mode
|
|
30
|
+
|
|
31
|
+
If you have an existing `webpack.config.js`, you can run `@utoo/pack` in compatibility mode:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
utoopack build --webpack
|
|
35
|
+
# or
|
|
36
|
+
utoopack dev --webpack
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 🛠️ Commands
|
|
40
|
+
|
|
41
|
+
- `utoopack dev`: Start development server.
|
|
42
|
+
- `utoopack build`: Build for production.
|
|
43
|
+
- `utoopack help`: Show help for all commands.
|
|
44
|
+
|
|
45
|
+
## 📄 License
|
|
46
|
+
|
|
47
|
+
[MIT](./LICENSE)
|
|
1
48
|
|
package/dist/utils/common.js
CHANGED
|
@@ -35,7 +35,7 @@ function resolveBuildOptions(flags) {
|
|
|
35
35
|
projectOptions = { webpackMode: true };
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
projectOptions = JSON.parse(fs_1.default.readFileSync(path_1.default.resolve(cwd, project || "", "
|
|
38
|
+
projectOptions = JSON.parse(fs_1.default.readFileSync(path_1.default.resolve(cwd, project || "", "utoopack.json"), {
|
|
39
39
|
encoding: "utf-8",
|
|
40
40
|
}));
|
|
41
41
|
}
|
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.6",
|
|
5
5
|
"author": "xusd320",
|
|
6
6
|
"bin": {
|
|
7
7
|
"utoopack": "./bin/run.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@oclif/core": "^4",
|
|
11
|
-
"@utoo/pack": "1.1.
|
|
11
|
+
"@utoo/pack": "1.1.6"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/node": "^20.3.0",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "rm -rf dist && tsc -b",
|
|
43
|
+
"clean": "rm -rf dist",
|
|
43
44
|
"prepublishOnly": "npm run build"
|
|
44
45
|
},
|
|
45
46
|
"types": "dist/index.d.ts"
|