Skip to content

Commit 4fda19d

Browse files
committed
wip: pass meteor-settings.json to dev meteor
1 parent 42fa160 commit 4fda19d

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ meteor/.coverage/
44
node_modules
55
**/yarn-error.log
66
scratch/
7+
meteor-settings.json
78

89
# Exclude JetBrains IDE specific files
910
.idea

scripts/run.mjs

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
import process from "process";
2+
import fs from "fs";
23
import concurrently from "concurrently";
34
import { EXTRA_PACKAGES, config } from "./lib.js";
45

6+
function joinCommand(...parts) {
7+
return parts.filter((part) => !!part).join(" ");
8+
}
9+
510
function watchPackages() {
611
return [
712
{
8-
command: config.uiOnly
9-
? `yarn watch ${EXTRA_PACKAGES.map((pkg) => `--ignore ${pkg}`).join(
13+
command: joinCommand('yarn watch',
14+
config.uiOnly
15+
? EXTRA_PACKAGES.map((pkg) => `--ignore ${pkg}`).join(
1016
" "
11-
)}`
12-
: "yarn watch",
17+
)
18+
: "",
19+
),
1320
cwd: "packages",
1421
name: "PACKAGES-TSC",
1522
prefixColor: "red",
@@ -29,6 +36,13 @@ function watchWorker() {
2936
}
3037

3138
function watchMeteor() {
39+
const settingsFileExists = fs.existsSync("meteor-settings.json");
40+
if (settingsFileExists) {
41+
console.log('Found meteor-settings.json')
42+
} else {
43+
console.log('No meteor-settings.json')
44+
}
45+
3246
return [
3347
{
3448
command: "yarn watch-types --preserveWatchOutput",
@@ -37,9 +51,12 @@ function watchMeteor() {
3751
prefixColor: "blue",
3852
},
3953
{
40-
command: `yarn debug${config.inspectMeteor ? " --inspect" : ""}${
41-
config.verbose ? " --verbose" : ""
42-
}`,
54+
command: joinCommand(
55+
'yarn debug',
56+
config.inspectMeteor ? " --inspect" : "",
57+
config.verbose ? " --verbose" : "",
58+
settingsFileExists ? " --settings ../meteor-settings.json" : ""
59+
),
4360
cwd: "meteor",
4461
name: "METEOR",
4562
prefixColor: "cyan",

0 commit comments

Comments
 (0)