@mahameru/cli 0.0.2 → 0.0.4
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 +16 -2
- package/dist/index.js +670 -260
- package/package.json +49 -48
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ Some commands also rely on these project dependencies:
|
|
|
39
39
|
- `typescript` for the compile step in the `build` command
|
|
40
40
|
- `tsc-alias` to rewrite path aliases after compilation
|
|
41
41
|
|
|
42
|
+
For application source aliases, prefer `tsconfig.json` paths such as `@/*`. Do not rely on `package.json#imports` for `src/**` files that must run from `dist/` in production.
|
|
43
|
+
|
|
42
44
|
## Usage
|
|
43
45
|
|
|
44
46
|
### Development
|
|
@@ -76,10 +78,21 @@ This command will:
|
|
|
76
78
|
|
|
77
79
|
- run `tsc --project tsconfig.json`
|
|
78
80
|
- run `tsc-alias -p tsconfig.json`
|
|
81
|
+
- fail if compiled `dist/**/*.js` files still contain unresolved `@/` or `#/` specifiers
|
|
79
82
|
|
|
80
83
|
### Start
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
Run the production server from the compiled `dist/` output:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
mahameru start
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This command will:
|
|
92
|
+
|
|
93
|
+
- load `dist/mahameru.config.js`
|
|
94
|
+
- run the Mahameru application using `dist/`, `dist/modules`, and `dist/routes`
|
|
95
|
+
- expect all application path aliases to have been rewritten during `mahameru build`
|
|
83
96
|
|
|
84
97
|
## Quick Workflow
|
|
85
98
|
|
|
@@ -87,7 +100,8 @@ This CLI is focused on the basic development workflow:
|
|
|
87
100
|
|
|
88
101
|
1. Use `mahameru dev` during local development.
|
|
89
102
|
2. Use `mahameru build` to produce the TypeScript build output.
|
|
90
|
-
3.
|
|
103
|
+
3. Use `@/*` path aliases in `tsconfig.json` when you want non-relative imports inside `src/`.
|
|
104
|
+
4. Run `mahameru start` after a successful build to verify the production output.
|
|
91
105
|
|
|
92
106
|
## Notes
|
|
93
107
|
|