@anansi/cli 1.2.0 → 1.3.0
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/CHANGELOG.md +10 -0
- package/README.md +7 -5
- package/package.json +2 -2
- package/run.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.3.0](https://github.com/ntucker/anansi/compare/@anansi/cli@1.2.0...@anansi/cli@1.3.0) (2022-05-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
* --serveProxy: [non-dev] uses webpack proxy config ([774f826](https://github.com/ntucker/anansi/commit/774f82646542d8acfcb0ddceb6fc75fcc2851a01))
|
|
12
|
+
* Add option to serve assets with production server ([bfb20eb](https://github.com/ntucker/anansi/commit/bfb20eb1564fc2c6b72fea79d0722ac6186797fe))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [1.2.0](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.70...@anansi/cli@1.2.0) (2022-05-29)
|
|
7
17
|
|
|
8
18
|
|
package/README.md
CHANGED
|
@@ -67,17 +67,19 @@ Usage: anansi serve [options] <entrypath>
|
|
|
67
67
|
runs server for SSR projects
|
|
68
68
|
|
|
69
69
|
Arguments:
|
|
70
|
-
entrypath
|
|
70
|
+
entrypath Path to entrypoint
|
|
71
71
|
|
|
72
72
|
Options:
|
|
73
|
-
|
|
74
|
-
-d, --dev
|
|
75
|
-
-
|
|
73
|
+
--pubPath <path> Where to serve assets from
|
|
74
|
+
-d, --dev Run devserver rather than using previously compiled output
|
|
75
|
+
-a, --serveAssets [non-dev] also serves client assets
|
|
76
|
+
-p, --serveProxy [non-dev] uses webpack proxy config
|
|
77
|
+
-h, --help display help for command
|
|
76
78
|
```
|
|
77
79
|
|
|
78
80
|
```json
|
|
79
81
|
{
|
|
80
82
|
"start": "anansi serve --dev ./src/index.tsx",
|
|
81
|
-
"start:
|
|
83
|
+
"start:server": "anansi serve ./dist-server/App.js",
|
|
82
84
|
}
|
|
83
85
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anansi/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Fast React Web Apps",
|
|
5
5
|
"homepage": "https://github.com/ntucker/anansi/tree/master/packages/cli#readme",
|
|
6
6
|
"repository": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"npm": ">= 6.0.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@anansi/generator-js": "^8.0.
|
|
54
|
+
"@anansi/generator-js": "^8.0.8",
|
|
55
55
|
"bin-version-check": "^4.0.0",
|
|
56
56
|
"chalk": "^4.1.2",
|
|
57
57
|
"commander": "^9.3.0",
|
package/run.js
CHANGED
|
@@ -106,11 +106,13 @@ program
|
|
|
106
106
|
.command('serve')
|
|
107
107
|
.description('runs server for SSR projects')
|
|
108
108
|
.argument('<entrypath>', 'Path to entrypoint')
|
|
109
|
-
.option('
|
|
109
|
+
.option('--pubPath <path>', 'Where to serve assets from')
|
|
110
110
|
.option(
|
|
111
111
|
'-d, --dev',
|
|
112
112
|
'Run devserver rather than using previously compiled output',
|
|
113
113
|
)
|
|
114
|
+
.option('-a, --serveAssets', '[non-dev] also serves client assets')
|
|
115
|
+
.option('-p, --serveProxy', '[non-dev] uses webpack proxy config')
|
|
114
116
|
.action(async (entrypath, options) => {
|
|
115
117
|
try {
|
|
116
118
|
const { serve, devServe } = await import('@anansi/core/scripts');
|
|
@@ -122,7 +124,7 @@ program
|
|
|
122
124
|
if (options.dev) {
|
|
123
125
|
devServe(entrypath);
|
|
124
126
|
} else {
|
|
125
|
-
serve(entrypath);
|
|
127
|
+
serve(entrypath, options);
|
|
126
128
|
}
|
|
127
129
|
} catch (error) {
|
|
128
130
|
if (error.code === 'ERR_MODULE_NOT_FOUND') {
|