noxt-cli 0.1.7 → 0.1.9
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/cmd_start.js
CHANGED
|
@@ -7,6 +7,15 @@ import { startServer } from 'noxt-server';
|
|
|
7
7
|
|
|
8
8
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
9
9
|
|
|
10
|
+
function die(msg) {
|
|
11
|
+
console.error(msg);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function warn(msg) {
|
|
16
|
+
console.warn(msg);
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
export async function execute([recipe], options) {
|
|
11
20
|
// read deafault config
|
|
12
21
|
let config = yaml.load(fs.readFileSync(path.resolve(__dirname, '../default.config.yaml'), 'utf8'));
|
|
@@ -31,7 +40,7 @@ export async function execute([recipe], options) {
|
|
|
31
40
|
// override config with command line options
|
|
32
41
|
for (const key in options) {
|
|
33
42
|
if (!(key in config)) {
|
|
34
|
-
warn(`Unknown config option: ${key}`);
|
|
43
|
+
//warn(`Unknown config option: ${key}`);
|
|
35
44
|
}
|
|
36
45
|
config[key] = options[key] ?? config[key];
|
|
37
46
|
}
|
package/package.json
CHANGED