polylith 0.1.33 → 0.1.34
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/bin/apps.js +7 -5
- package/package.json +1 -1
package/bin/apps.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
apps.js
|
|
1
2
|
import path from 'node:path/posix';
|
|
2
3
|
import {readFile} from 'node:fs/promises';
|
|
3
4
|
import {ConfigApp} from '@polylith/builder';
|
|
@@ -145,20 +146,21 @@ export async function build(name, config, options, watch) {
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
|
|
148
|
-
async function server(
|
|
149
|
-
var server = new PolylithServer(
|
|
150
|
-
await server.create(
|
|
151
|
-
await server.start(
|
|
149
|
+
async function server(options) {
|
|
150
|
+
var server = new PolylithServer(options, options.dest);
|
|
151
|
+
await server.create(options.apps);
|
|
152
|
+
await server.start(options.port || '8081');
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
export async function watch(name, config, options) {
|
|
156
|
+
console.log('watch', name, config, options);
|
|
155
157
|
var apps = await build(name, config, options, true);
|
|
156
158
|
|
|
157
159
|
for (let app of apps) {
|
|
158
160
|
await app.watch();
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
await server(
|
|
163
|
+
await server({...options, apps: apps});
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
export async function test(name, config, options) {
|