Skip to content

Commit 3b4ae1c

Browse files
committed
chore(monorepo): Update repository to use latest standards
1 parent 82353dd commit 3b4ae1c

File tree

10 files changed

+310
-174
lines changed

10 files changed

+310
-174
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/storm-banner.gif" width="100%" alt="Storm Software" /></div>
1+
<div align="center"><img src="https://public.storm-cdn.com/storm-banner.gif" width="100%" alt="Storm Software" /></div>
22

33
<br />
44
<div align="center">
@@ -346,7 +346,7 @@ specification. Contributions of any kind welcome!
346346
<br />
347347

348348
<div align="center">
349-
<img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/logo-banner.png" width="100%" alt="Storm Software" />
349+
<img src="https://public.storm-cdn.com/brand-banner.png" width="100%" alt="Storm Software" />
350350
</div>
351351
<br />
352352

@@ -355,7 +355,7 @@ specification. Contributions of any kind welcome!
355355
</div>
356356

357357
<div align="center">
358-
<b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D
358+
<b>Fingerprint:</b> F47F 1853 BCAD DE9B 42C8 6316 9FDE EC95 47FE D106
359359
</div>
360360
<br />
361361

@@ -378,6 +378,12 @@ channel!
378378

379379
<br />
380380

381-
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
381+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
382+
<br />
383+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
384+
385+
<br />
386+
387+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
388+
<br />
382389
<br />
383-
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>

eslint.config.mjs

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*-------------------------------------------------------------------
1+
/* -------------------------------------------------------------------
22
3-
⚡ Storm Software - Monorepo Template
3+
⚡ Storm Software - Monorepo Template
44
55
This code was released as part of the Monorepo Template project. Monorepo Template
66
is maintained by Storm Software under the Apache-2.0 License, and is
@@ -13,29 +13,16 @@
1313
Contact: https://stormsoftware.com/contact
1414
License: https://stormsoftware.com/projects/monorepo-template/license
1515
16-
-------------------------------------------------------------------*/
16+
------------------------------------------------------------------- */
1717

18-
import { getStormConfig } from "@storm-software/eslint";
18+
import { getStormConfig } from "@storm-software/eslint";
1919

20-
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
20+
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
2121

22-
/** @type {import('eslint').Linter.Config[]} */
23-
export default getStormConfig({
24-
name: "monorepo-template",
25-
rules: {
26-
"unicorn/no-null": 0,
27-
"unicorn/no-useless-switch-case": 0,
28-
"react/require-default-props": 0,
29-
"react/jsx-closing-bracket-location": 0,
30-
"indent": 0,
31-
"no-redeclare": 0,
32-
"class-methods-use-this": 0,
33-
"operator-linebreak": 0,
34-
"function-paren-newline": 0,
35-
"space-before-function-paren": 0
36-
},
37-
markdown: true,
38-
react: true,
39-
useUnicorn: true,
40-
typescriptEslintConfigType: "base"
41-
});
22+
/** @type {import('eslint').Linter.Config[]} */
23+
export default getStormConfig({
24+
repositoryName: "monorepo-template",
25+
pnpm: {
26+
ignore: ["typescript"]
27+
}
28+
});

tools/readme-templates/README.footer.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ specification. Contributions of any kind welcome!
118118
<br />
119119

120120
<div align="center">
121-
<img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/logo-banner.png" width="100%" alt="Storm Software" />
121+
<img src="https://public.storm-cdn.com/brand-banner.png" width="100%" alt="Storm Software" />
122122
</div>
123123
<br />
124124

@@ -127,7 +127,7 @@ specification. Contributions of any kind welcome!
127127
</div>
128128

129129
<div align="center">
130-
<b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D
130+
<b>Fingerprint:</b> F47F 1853 BCAD DE9B 42C8 6316 9FDE EC95 47FE D106
131131
</div>
132132
<br />
133133

@@ -145,13 +145,14 @@ receive release notifications, ask questions, and get involved.
145145
If this sounds interesting, and you would like to help us in creating the next
146146
generation of development tools, please reach out on our
147147
[website](https://stormsoftware.com/contact) or join our
148-
[Slack channel](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)!
148+
[Slack](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)
149+
channel!
149150

150151
<br />
151152

152-
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
153+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
153154
<br />
154-
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
155+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
155156

156157
<br />
157158

tools/readme-templates/README.header.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/storm-banner.gif" width="100%" alt="Storm Software" /></div>
1+
<div align="center"><img src="https://public.storm-cdn.com/storm-banner.gif" width="100%" alt="Storm Software" /></div>
22
<br />
33

44
<div align="center">

tools/scripts/src/bootstrap.mjs

Lines changed: 47 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
/*-------------------------------------------------------------------
1+
#!/usr/bin/env zx
2+
/* -------------------------------------------------------------------
23
3-
⚡ Storm Software - Monorepo Template
4+
⚡ Storm Software - Monorepo Template
45
56
This code was released as part of the Monorepo Template project. Monorepo Template
67
is maintained by Storm Software under the Apache-2.0 License, and is
@@ -13,31 +14,47 @@
1314
Contact: https://stormsoftware.com/contact
1415
License: https://stormsoftware.com/projects/monorepo-template/license
1516
16-
-------------------------------------------------------------------*/
17-
18-
import { chalk, echo, usePwsh } from "zx";
19-
20-
usePwsh();
21-
22-
try {
23-
// await build({
24-
// entryPoints: ["tools/nx/src/plugins/package-build.ts"],
25-
// target: "node22",
26-
// outdir: "dist/plugins",
27-
// tsconfig: "tools/nx/tsconfig.json",
28-
// packages: "bundle",
29-
// external: ["nx", "@nx/devkit"],
30-
// logLevel: "info",
31-
// bundle: true,
32-
// minify: false,
33-
// format: "esm",
34-
// platform: "node",
35-
// preserveSymlinks: true
36-
// });
37-
38-
echo`${chalk.green("Completed monorepo bootstrapping successfully!")}`;
39-
} catch (error) {
40-
echo`${chalk.red(`A failure occurred while building the monorepo:
41-
${error?.message ? error.message : "No message could be found"}
42-
`)}`;
43-
}
17+
------------------------------------------------------------------- */
18+
19+
import { chalk, echo, usePwsh } from "zx";
20+
21+
// eslint-disable-next-line react-hooks/rules-of-hooks
22+
usePwsh();
23+
24+
try {
25+
await echo`${chalk.whiteBright("⚙️ Bootstrapping the monorepo...")}`;
26+
27+
// await build({
28+
// entryPoints: [
29+
// "tools/nx/src/plugins/plugin.ts",
30+
// ],
31+
// target: "node22",
32+
// outdir: "dist/plugins",
33+
// tsconfig: "tools/nx/tsconfig.json",
34+
// packages: "bundle",
35+
// external: ["nx", "@nx/devkit"],
36+
// logLevel: "info",
37+
// bundle: true,
38+
// minify: false,
39+
// format: "esm",
40+
// platform: "node",
41+
// preserveSymlinks: true
42+
// });
43+
44+
const proc = $`pnpm nx reset`.timeout(`${5 * 60}s`);
45+
proc.stdout.on("data", data => {
46+
echo`${data}`;
47+
});
48+
const result = await proc;
49+
if (!result.ok) {
50+
throw new Error(
51+
`An error occurred while resetting the Nx deamon process: \n\n${result.message}\n`
52+
);
53+
}
54+
55+
echo`${chalk.green("Completed monorepo bootstrapping successfully!")}`;
56+
} catch (error) {
57+
echo`${chalk.red(error?.message ? error.message : "A failure occured while bootstrapping the monorepo")}`;
58+
59+
process.exit(1);
60+
}

tools/scripts/src/build.mjs

Lines changed: 67 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
/*-------------------------------------------------------------------
1+
#!/usr/bin/env zx
2+
/* -------------------------------------------------------------------
23
3-
⚡ Storm Software - Monorepo Template
4+
⚡ Storm Software - Monorepo Template
45
56
This code was released as part of the Monorepo Template project. Monorepo Template
67
is maintained by Storm Software under the Apache-2.0 License, and is
@@ -13,39 +14,67 @@
1314
Contact: https://stormsoftware.com/contact
1415
License: https://stormsoftware.com/projects/monorepo-template/license
1516
16-
-------------------------------------------------------------------*/
17-
18-
import { $, argv, chalk, echo, usePwsh } from "zx";
19-
20-
usePwsh();
21-
22-
try {
23-
let configuration = argv.configuration;
24-
if (!configuration) {
25-
if (argv.prod) {
26-
configuration = "production";
27-
} else if (argv.dev) {
28-
configuration = "development";
29-
} else {
30-
configuration = "production";
31-
}
32-
}
33-
34-
echo`${chalk.whiteBright(`
35-
Building the monorepo in ${configuration} mode
36-
`)}`;
37-
38-
await $`pnpm bootstrap`.timeout(`60s`);
39-
40-
if (configuration === "production") {
41-
await $`pnpm nx run-many --target=build --all --exclude="@monorepo-template/monorepo" --configuration=production --parallel=5`;
42-
} else {
43-
await $`pnpm nx run-many --target=build --all --exclude="@monorepo-template/monorepo" --configuration=${configuration} --nxBail`;
44-
}
45-
46-
echo`${chalk.green(`Successfully built the monorepo in ${configuration} mode!`)}`;
47-
} catch (error) {
48-
echo`${chalk.red(`A failure occurred while building the monorepo:
49-
${error?.message ? error.message : "No message could be found"}
50-
`)}`;
51-
}
17+
------------------------------------------------------------------- */
18+
19+
import { $, argv, chalk, echo, usePwsh } from "zx";
20+
21+
// eslint-disable-next-line react-hooks/rules-of-hooks
22+
usePwsh();
23+
24+
try {
25+
let configuration = argv.configuration;
26+
if (!configuration) {
27+
if (argv.prod) {
28+
configuration = "production";
29+
} else if (argv.dev) {
30+
configuration = "development";
31+
} else {
32+
configuration = "production";
33+
}
34+
}
35+
36+
await echo`${chalk.whiteBright(`📦 Building the monorepo in ${configuration} mode...`)}`;
37+
38+
let proc = $`pnpm bootstrap`.timeout("60s");
39+
proc.stdout.on("data", data => {
40+
echo`${data}`;
41+
});
42+
let result = await proc;
43+
if (!result.ok) {
44+
throw new Error(
45+
`An error occurred while bootstrapping the monorepo: \n\n${result.message}\n`
46+
);
47+
}
48+
49+
if (configuration === "production") {
50+
proc = $`pnpm nx run-many --target=build --all --exclude="@monorepo-template/monorepo" --configuration=production --parallel=5`;
51+
proc.stdout.on("data", data => {
52+
echo`${data}`;
53+
});
54+
result = await proc;
55+
56+
if (!result.ok) {
57+
throw new Error(
58+
`An error occurred while building the monorepo in production mode: \n\n${result.message}\n`
59+
);
60+
}
61+
} else {
62+
proc = $`pnpm nx run-many --target=build --all --exclude="@monorepo-template/monorepo" --configuration=${configuration} --nxBail`;
63+
proc.stdout.on("data", data => {
64+
echo`${data}`;
65+
});
66+
result = await proc;
67+
68+
if (!result.ok) {
69+
throw new Error(
70+
`An error occurred while building the monorepo in development mode: \n\n${result.message}\n`
71+
);
72+
}
73+
}
74+
75+
echo`${chalk.green(`Successfully built the monorepo in ${configuration} mode!`)}`;
76+
} catch (error) {
77+
echo`${chalk.red(error?.message ? error.message : "A failure occurred while building the monorepo")}`;
78+
79+
process.exit(1);
80+
}

0 commit comments

Comments
 (0)