Skip to content

Commit 8db69fb

Browse files
committed
feat(monorepo): Added the shared configuration package
1 parent 07c7af7 commit 8db69fb

File tree

8 files changed

+70
-4
lines changed

8 files changed

+70
-4
lines changed

lefthook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pre-push:
106106
run: "pnpm exec storm-lint codeowners"
107107
lint-github-actions:
108108
glob: ".github/workflows/*.*"
109-
run: "zizmor --offline .github/workflows/"
109+
run: zizmor --offline --config="./tools/config/zizmor.yml" .github/workflows/
110110
sherif:
111111
glob:
112112
- "*.js"

project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"executor": "@nx/js:verdaccio",
88
"options": {
99
"port": 4873,
10-
"config": ".verdaccio/config.yml",
10+
"config": "tools/config/verdaccio.yml",
1111
"storage": "tmp/local-registry/storage"
1212
}
1313
}

tools/config/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Monorepo Template - Shared Config Tools
2+
3+
A collection of tools for managing shared configuration files used in the Monorepo Template monorepo.
4+
5+
This library was generated with [Nx](https://nx.dev).

tools/config/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "@storm-stack/tools-config",
3+
"version": "0.0.1",
4+
"private": true
5+
}

tools/config/tsup.shared.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* -------------------------------------------------------------------
2+
3+
⚡ Storm Software - Monorepo Template
4+
5+
This code was released as part of the Monorepo Template project. Monorepo Template
6+
is maintained by Storm Software under the Apache-2.0 License, and is
7+
free for commercial and private use. For more information, please visit
8+
our licensing page.
9+
10+
Website: https://stormsoftware.com
11+
Repository: https://github.com/storm-software/monorepo-template
12+
Documentation: https://stormsoftware.com/projects/monorepo-template/docs
13+
Contact: https://stormsoftware.com/contact
14+
License: https://stormsoftware.com/projects/monorepo-template/license
15+
16+
------------------------------------------------------------------- */
17+
18+
import type { Options } from "tsup";
19+
import { defineConfig } from "tsup";
20+
21+
export const getTsupConfig = (
22+
options: Partial<Options> & Pick<Options, "name" | "entryPoints">
23+
) =>
24+
defineConfig({
25+
target: "node22",
26+
outDir: "dist",
27+
format: ["cjs", "esm"],
28+
bundle: true,
29+
splitting: true,
30+
treeshake: true,
31+
keepNames: true,
32+
clean: true,
33+
sourcemap: false,
34+
platform: "node",
35+
tsconfig: "./tsconfig.json",
36+
dts: {
37+
resolve: true
38+
},
39+
onSuccess: async () => {
40+
// eslint-disable-next-line no-console
41+
console.log(`${options.name} build completed successfully!`);
42+
},
43+
...options
44+
});

.verdaccio/config.yml renamed to tools/config/verdaccio.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ uplinks:
88
maxage: 60m
99

1010
packages:
11-
"@monorepo-template/*":
11+
"@storm-stack/*":
1212
access: $all
1313
publish: $all
1414
proxy: http://localhost:4873

tools/config/zizmor.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
rules:
2+
template-injection:
3+
ignore:
4+
- release.yml
5+
dangerous-triggers:
6+
ignore:
7+
- greetings.yml:3:1
8+
use-trusted-publishing:
9+
ignore:
10+
# ignore line 12, column 10 on pypi.yml
11+
# - pypi.yml:12:10

tsconfig.base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"rootDir": ".",
88
"paths": {
99
"@monorepo-template/tools-scripts": ["tools/scripts/src/index.ts"],
10-
"@monorepo-template/tools-scripts/*": ["tools/scripts/src/*"]
10+
"@monorepo-template/tools-scripts/*": ["tools/scripts/src/*"],
11+
"@monorepo-template/tools-config/*": ["tools/config/*"]
1112
}
1213
}
1314
}

0 commit comments

Comments
 (0)