@storm-software/workspace-tools 1.62.18 → 1.62.19

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.
Files changed (101) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/declarations.d.ts +129 -0
  3. package/executors.json +35 -0
  4. package/generators.json +53 -0
  5. package/index.js +4 -2410
  6. package/meta.json +1 -1
  7. package/package.json +16 -2
  8. package/src/executors/npm-publish/schema.d.ts +8 -0
  9. package/src/executors/npm-publish/schema.json +26 -0
  10. package/src/executors/tsup/executor.js +4 -2410
  11. package/src/executors/tsup/schema.d.ts +48 -0
  12. package/src/executors/tsup/schema.json +223 -0
  13. package/src/executors/tsup-browser/executor.js +4 -2410
  14. package/src/executors/tsup-browser/schema.d.ts +9 -0
  15. package/src/executors/tsup-browser/schema.json +11 -0
  16. package/src/executors/tsup-neutral/executor.js +4 -2410
  17. package/src/executors/tsup-neutral/schema.d.ts +5 -0
  18. package/src/executors/tsup-neutral/schema.json +11 -0
  19. package/src/executors/tsup-node/executor.js +4 -2410
  20. package/src/executors/tsup-node/schema.d.ts +7 -0
  21. package/src/executors/tsup-node/schema.json +20 -0
  22. package/src/executors/typia/schema.d.ts +6 -0
  23. package/src/executors/typia/schema.json +38 -0
  24. package/src/generators/browser-library/files/README.md +58 -0
  25. package/src/generators/browser-library/files/jest.config.ts +3 -0
  26. package/src/generators/browser-library/files/src/index.ts.template +10 -0
  27. package/src/generators/browser-library/files/tsconfig.spec.json +13 -0
  28. package/src/generators/browser-library/schema.d.ts +22 -0
  29. package/src/generators/browser-library/schema.json +82 -0
  30. package/src/generators/config-schema/schema.d.ts +3 -0
  31. package/src/generators/config-schema/schema.json +20 -0
  32. package/src/generators/init/schema.d.ts +3 -0
  33. package/src/generators/init/schema.json +16 -0
  34. package/src/generators/neutral-library/files/README.md +58 -0
  35. package/src/generators/neutral-library/files/jest.config.ts +3 -0
  36. package/src/generators/neutral-library/files/src/index.ts.template +10 -0
  37. package/src/generators/neutral-library/files/tsconfig.spec.json +13 -0
  38. package/src/generators/neutral-library/schema.d.ts +6 -0
  39. package/src/generators/neutral-library/schema.json +82 -0
  40. package/src/generators/node-library/files/README.md +58 -0
  41. package/src/generators/node-library/files/jest.config.ts +3 -0
  42. package/src/generators/node-library/files/src/index.ts.template +10 -0
  43. package/src/generators/node-library/files/tsconfig.spec.json +13 -0
  44. package/src/generators/node-library/schema.d.ts +22 -0
  45. package/src/generators/node-library/schema.json +82 -0
  46. package/src/generators/preset/files/.all-contributorsrc.template +48 -0
  47. package/src/generators/preset/files/.editorconfig +454 -0
  48. package/src/generators/preset/files/.env.template +43 -0
  49. package/src/generators/preset/files/.gitattributes +52 -0
  50. package/src/generators/preset/files/.github/.nvmrc +1 -0
  51. package/src/generators/preset/files/.github/.whitesource +14 -0
  52. package/src/generators/preset/files/.github/CODEOWNERS +1 -0
  53. package/src/generators/preset/files/.github/CODE_OF_CONDUCT.md +125 -0
  54. package/src/generators/preset/files/.github/CONTRIBUTING.md.template +15 -0
  55. package/src/generators/preset/files/.github/FUNDING.yml +3 -0
  56. package/src/generators/preset/files/.github/ISSUE_TEMPLATE/bug-report.yml.template +102 -0
  57. package/src/generators/preset/files/.github/ISSUE_TEMPLATE/documentation.yml.template +56 -0
  58. package/src/generators/preset/files/.github/ISSUE_TEMPLATE/feature-request.yml.template +60 -0
  59. package/src/generators/preset/files/.github/PULL_REQUEST_TEMPLATE.md.template +39 -0
  60. package/src/generators/preset/files/.github/SECURITY.md +9 -0
  61. package/src/generators/preset/files/.github/actions/setup-workspace/action.yaml +41 -0
  62. package/src/generators/preset/files/.github/codecov.yml +29 -0
  63. package/src/generators/preset/files/.github/labels.yml +78 -0
  64. package/src/generators/preset/files/.github/renovate.json.template +51 -0
  65. package/src/generators/preset/files/.github/stale.yml +50 -0
  66. package/src/generators/preset/files/.github/workflows/build-release.yml.template +94 -0
  67. package/src/generators/preset/files/.github/workflows/code-review.yml +18 -0
  68. package/src/generators/preset/files/.github/workflows/codeql.yml +84 -0
  69. package/src/generators/preset/files/.github/workflows/git-guardian.yml +23 -0
  70. package/src/generators/preset/files/.github/workflows/greetings.yml +24 -0
  71. package/src/generators/preset/files/.github/workflows/labels.yml +31 -0
  72. package/src/generators/preset/files/.github/workflows/lock.yml +26 -0
  73. package/src/generators/preset/files/.log4brains.yml.template +5 -0
  74. package/src/generators/preset/files/.markdownlint.json +28 -0
  75. package/src/generators/preset/files/.verdaccio/config.yml.template +40 -0
  76. package/src/generators/preset/files/.vscode/README.md +32 -0
  77. package/src/generators/preset/files/.vscode/cspell.json +3 -0
  78. package/src/generators/preset/files/.vscode/extensions.json +14 -0
  79. package/src/generators/preset/files/.vscode/launch.json +37 -0
  80. package/src/generators/preset/files/.vscode/settings.json +316 -0
  81. package/src/generators/preset/files/.vscode/tasks.json +19 -0
  82. package/src/generators/preset/files/LICENSE +201 -0
  83. package/src/generators/preset/files/README.md.template +273 -0
  84. package/src/generators/preset/files/assets/diagrams/.gitkeep +0 -0
  85. package/src/generators/preset/files/assets/icons/dark/.gitkeep +0 -0
  86. package/src/generators/preset/files/assets/icons/light/.gitkeep +0 -0
  87. package/src/generators/preset/files/assets/logos/.gitkeep +0 -0
  88. package/src/generators/preset/files/biome.json +4 -0
  89. package/src/generators/preset/files/docs/api-reference/.gitkeep +0 -0
  90. package/src/generators/preset/files/docs/readme-templates/README.footer.md.template +94 -0
  91. package/src/generators/preset/files/docs/readme-templates/README.header.md.template +17 -0
  92. package/src/generators/preset/files/lefthook.json +6 -0
  93. package/src/generators/preset/files/nx.json +3 -0
  94. package/src/generators/preset/files/pnpm-workspace.yaml +6 -0
  95. package/src/generators/preset/files/socket.yaml +20 -0
  96. package/src/generators/preset/files/tsconfig.base.json.template +11 -0
  97. package/src/generators/preset/schema.d.ts +14 -0
  98. package/src/generators/preset/schema.json +103 -0
  99. package/src/generators/release-version/schema.d.ts +3 -0
  100. package/src/generators/release-version/schema.json +66 -0
  101. package/src/utils/index.js +4 -2410
@@ -0,0 +1,7 @@
1
+ import type { TsupNeutralExecutorSchema } from "../tsup-neutral/schema";
2
+ import type { Platform } from "../tsup/schema";
3
+
4
+ export type TsupNodeExecutorSchema = Omit<TsupNeutralExecutorSchema, "platform"> & {
5
+ transports: string[];
6
+ platform?: Platform;
7
+ };
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "tsup-node",
4
+ "extends": "../tsup/schema.json",
5
+ "version": 2,
6
+ "title": "Node TypeScript Builder",
7
+ "description": "Runs a node platform TypeScript build",
8
+ "type": "object",
9
+ "properties": {
10
+ "transports": {
11
+ "type": "array",
12
+ "description": "",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "default": ["pino-pretty", "pino-loki"]
17
+ }
18
+ },
19
+ "required": []
20
+ }
@@ -0,0 +1,6 @@
1
+ export interface TypiaExecutorSchema {
2
+ entryPath: string;
3
+ outputPath: string;
4
+ tsConfig: string;
5
+ clean?: boolean;
6
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "typia",
4
+ "version": 2,
5
+ "title": "Typia Generate Executor",
6
+ "description": "Run the Typia generator to create runtime type validators",
7
+ "type": "object",
8
+ "properties": {
9
+ "entryPath": {
10
+ "type": "string",
11
+ "description": "The path of the typescript files using `typia`.",
12
+ "alias": "main",
13
+ "default": "{sourceRoot}"
14
+ },
15
+ "outputPath": {
16
+ "type": "string",
17
+ "description": "The output path of the generated files.",
18
+ "x-completion-type": "directory",
19
+ "x-priority": "important",
20
+ "default": "{sourceRoot}/__generated__/typia"
21
+ },
22
+ "tsConfig": {
23
+ "type": "string",
24
+ "description": "The path to the `tsconfig.json` file.",
25
+ "x-completion-type": "file",
26
+ "x-completion-glob": "tsconfig.*.json",
27
+ "x-priority": "important",
28
+ "default": "{projectRoot}/tsconfig.json"
29
+ },
30
+ "clean": {
31
+ "type": "boolean",
32
+ "description": "Remove previous output before build.",
33
+ "alias": "deleteOutputPath",
34
+ "default": true
35
+ }
36
+ },
37
+ "required": ["entryPath", "outputPath", "tsConfig"]
38
+ }
@@ -0,0 +1,58 @@
1
+ <!-- START header -->
2
+ <!-- END header -->
3
+
4
+ # <%= name %>
5
+
6
+ <%= description %>
7
+
8
+ <!-- START doctoc -->
9
+ <!-- END doctoc -->
10
+
11
+ ## Installing
12
+
13
+ Using [pnpm](http://pnpm.io):
14
+
15
+ ```bash
16
+ pnpm add -D <%= namespace %>/<%= name %>
17
+ ```
18
+
19
+ <details>
20
+ <summary>Using npm</summary>
21
+
22
+ ```bash
23
+ npm install -D <%= namespace %>/<%= name %>
24
+ ```
25
+
26
+ </details>
27
+
28
+ <details>
29
+ <summary>Using yarn</summary>
30
+
31
+ ```bash
32
+ yarn add -D <%= namespace %>/<%= name %>
33
+ ```
34
+
35
+ </details>
36
+
37
+ ## Reduced Package Size
38
+
39
+ This project uses [tsup](https://tsup.egoist.dev/) to package the source code due to its ability to remove unused code and ship smaller javascript files thanks to code splitting. This helps to greatly reduce the size of the package and to make it easier to use in other projects.
40
+
41
+ ## Development
42
+
43
+ This project is built using [Nx](https://nx.dev). As a result, many of the usual commands are available to assist in development.
44
+
45
+ ### Building
46
+
47
+ Run `nx build <%= name %>` to build the library.
48
+
49
+ ### Running unit tests
50
+
51
+ Run `nx test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
52
+
53
+ ### Linting
54
+
55
+ Run `nx lint <%= name %>` to run [ESLint](https://eslint.org/) on the package.
56
+
57
+ <!-- START footer -->
58
+ <!-- END footer -->
@@ -0,0 +1,3 @@
1
+ import { getJestConfig } from "@storm-software/testing-tools";
2
+
3
+ export default getJestConfig("<%= directory %>", true, "<%= name %>");
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The <%= name %> library used by Storm Software for building TypeScript applications.
3
+ *
4
+ * @remarks
5
+ * <%= description %>
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+
10
+ const variable = "<%= name %>";
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
+ "types": ["jest"]
6
+ },
7
+ "include": [
8
+ "jest.config.ts",
9
+ "src/**/*.test.ts",
10
+ "src/**/*.spec.ts",
11
+ "src/**/*.d.ts"
12
+ ]
13
+ }
@@ -0,0 +1,22 @@
1
+ import { LibraryGeneratorSchema } from "@nx/js/src/utils/schema";
2
+
3
+ export type BrowserLibraryGeneratorSchema = Omit<
4
+ LibraryGeneratorSchema,
5
+ | "js"
6
+ | "pascalCaseFiles"
7
+ | "skipFormat"
8
+ | "skipTsConfig"
9
+ | "skipPackageJson"
10
+ | "includeBabelRc"
11
+ | "unitTestRunner"
12
+ | "linter"
13
+ | "testEnvironment"
14
+ | "config"
15
+ | "compiler"
16
+ | "bundler"
17
+ | "skipTypeCheck"
18
+ | "minimal"
19
+ > & {
20
+ name: string;
21
+ description: string;
22
+ };
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "browser-library",
4
+ "title": "Add browser Library",
5
+ "description": "Create a new browser TypeScript library package in the Storm workspace",
6
+ "type": "object",
7
+ "properties": {
8
+ "name": {
9
+ "type": "string",
10
+ "description": "A name for the library.",
11
+ "$default": {
12
+ "$source": "argv",
13
+ "index": 0
14
+ },
15
+ "x-prompt": "What name would you like to use for the library?",
16
+ "pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "The library used by Storm Software for building TypeScript applications.",
21
+ "$default": {
22
+ "$source": "argv",
23
+ "index": 2
24
+ },
25
+ "x-prompt": "Provide description to use as a summary of the library?"
26
+ },
27
+ "directory": {
28
+ "type": "string",
29
+ "description": "A directory where the lib is placed.",
30
+ "x-priority": "important"
31
+ },
32
+ "projectNameAndRootFormat": {
33
+ "description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
34
+ "type": "string",
35
+ "enum": ["as-provided", "derived"]
36
+ },
37
+ "tags": {
38
+ "type": "string",
39
+ "description": "Add tags to the library (used for linting)."
40
+ },
41
+ "strict": {
42
+ "type": "boolean",
43
+ "description": "Whether to enable tsconfig strict mode or not.",
44
+ "default": true
45
+ },
46
+ "publishable": {
47
+ "type": "boolean",
48
+ "default": false,
49
+ "description": "Generate a publishable library.",
50
+ "x-priority": "important"
51
+ },
52
+ "importPath": {
53
+ "type": "string",
54
+ "description": "The library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library.",
55
+ "x-priority": "important"
56
+ },
57
+ "buildable": {
58
+ "type": "boolean",
59
+ "default": true,
60
+ "description": "Generate a buildable library.",
61
+ "x-deprecated": "Use the `bundler` option for greater control (swc, tsc, rollup, vite, esbuild, none)."
62
+ },
63
+ "setParserOptionsProject": {
64
+ "type": "boolean",
65
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
66
+ "default": false
67
+ },
68
+ "rootProject": {
69
+ "type": "boolean",
70
+ "default": false,
71
+ "description": "Is the current project the root project in the workspace."
72
+ }
73
+ },
74
+ "required": [
75
+ "name",
76
+ "directory",
77
+ "projectNameAndRootFormat",
78
+ "publishable",
79
+ "importPath",
80
+ "buildable"
81
+ ]
82
+ }
@@ -0,0 +1,3 @@
1
+ export interface ConfigSchemaGeneratorSchema {
2
+ outputFile?: string;
3
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "config-schema",
4
+ "title": "Configuration Schema Creator",
5
+ "description": "Create a StormConfig JSON schema based on the workspace's project configurations",
6
+ "type": "object",
7
+ "properties": {
8
+ "outputFile": {
9
+ "type": "string",
10
+ "description": "The file path where the schema json will be written (relative to the workspace root)",
11
+ "$default": {
12
+ "$source": "argv",
13
+ "index": 0
14
+ },
15
+ "x-prompt": "Where should the schema json be written (relative to the workspace root)?",
16
+ "default": "{workspaceRoot}/storm.schema.json"
17
+ }
18
+ },
19
+ "required": ["outputFile"]
20
+ }
@@ -0,0 +1,3 @@
1
+ export interface Schema {
2
+ skipFormat?: boolean;
3
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "StormWorkspaceInit",
4
+ "cli": "nx",
5
+ "title": "Init Storm Workspace Plugin",
6
+ "description": "Init Storm Workspace Plugin.",
7
+ "type": "object",
8
+ "properties": {
9
+ "skipFormat": {
10
+ "description": "Skip formatting files.",
11
+ "type": "boolean",
12
+ "default": false
13
+ }
14
+ },
15
+ "required": []
16
+ }
@@ -0,0 +1,58 @@
1
+ <!-- START header -->
2
+ <!-- END header -->
3
+
4
+ # <%= name %>
5
+
6
+ <%= description %>
7
+
8
+ <!-- START doctoc -->
9
+ <!-- END doctoc -->
10
+
11
+ ## Installing
12
+
13
+ Using [pnpm](http://pnpm.io):
14
+
15
+ ```bash
16
+ pnpm add -D <%= namespace %>/<%= name %>
17
+ ```
18
+
19
+ <details>
20
+ <summary>Using npm</summary>
21
+
22
+ ```bash
23
+ npm install -D <%= namespace %>/<%= name %>
24
+ ```
25
+
26
+ </details>
27
+
28
+ <details>
29
+ <summary>Using yarn</summary>
30
+
31
+ ```bash
32
+ yarn add -D <%= namespace %>/<%= name %>
33
+ ```
34
+
35
+ </details>
36
+
37
+ ## Reduced Package Size
38
+
39
+ This project uses [tsup](https://tsup.egoist.dev/) to package the source code due to its ability to remove unused code and ship smaller javascript files thanks to code splitting. This helps to greatly reduce the size of the package and to make it easier to use in other projects.
40
+
41
+ ## Development
42
+
43
+ This project is built using [Nx](https://nx.dev). As a result, many of the usual commands are available to assist in development.
44
+
45
+ ### Building
46
+
47
+ Run `nx build <%= name %>` to build the library.
48
+
49
+ ### Running unit tests
50
+
51
+ Run `nx test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
52
+
53
+ ### Linting
54
+
55
+ Run `nx lint <%= name %>` to run [ESLint](https://eslint.org/) on the package.
56
+
57
+ <!-- START footer -->
58
+ <!-- END footer -->
@@ -0,0 +1,3 @@
1
+ import { getJestConfig } from "@storm-software/testing-tools";
2
+
3
+ export default getJestConfig("<%= directory %>", true, "<%= name %>");
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The <%= name %> library used by Storm Software for building TypeScript applications.
3
+ *
4
+ * @remarks
5
+ * <%= description %>
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+
10
+ const variable = "<%= name %>";
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
+ "types": ["jest", "node"]
6
+ },
7
+ "include": [
8
+ "jest.config.ts",
9
+ "src/**/*.test.ts",
10
+ "src/**/*.spec.ts",
11
+ "src/**/*.d.ts"
12
+ ]
13
+ }
@@ -0,0 +1,6 @@
1
+ import { TypeScriptLibraryGeneratorSchema } from "../../base/typescript-library-generator";
2
+
3
+ export type NeutralLibraryGeneratorSchema = Omit<
4
+ TypeScriptLibraryGeneratorSchema,
5
+ "platform"
6
+ >;
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "neutral-library",
4
+ "title": "Add Neutral Library",
5
+ "description": "Create a new Neutral TypeScript library package in the Storm workspaces",
6
+ "type": "object",
7
+ "properties": {
8
+ "name": {
9
+ "type": "string",
10
+ "description": "A name for the library.",
11
+ "$default": {
12
+ "$source": "argv",
13
+ "index": 0
14
+ },
15
+ "x-prompt": "What name would you like to use for the library?",
16
+ "pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "The library used by Storm Software for building TypeScript applications.",
21
+ "$default": {
22
+ "$source": "argv",
23
+ "index": 2
24
+ },
25
+ "x-prompt": "Provide description to use as a summary of the library?"
26
+ },
27
+ "directory": {
28
+ "type": "string",
29
+ "description": "A directory where the lib is placed.",
30
+ "x-priority": "important"
31
+ },
32
+ "projectNameAndRootFormat": {
33
+ "description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
34
+ "type": "string",
35
+ "enum": ["as-provided", "derived"]
36
+ },
37
+ "tags": {
38
+ "type": "string",
39
+ "description": "Add tags to the library (used for linting)."
40
+ },
41
+ "strict": {
42
+ "type": "boolean",
43
+ "description": "Whether to enable tsconfig strict mode or not.",
44
+ "default": true
45
+ },
46
+ "publishable": {
47
+ "type": "boolean",
48
+ "default": false,
49
+ "description": "Generate a publishable library.",
50
+ "x-priority": "important"
51
+ },
52
+ "importPath": {
53
+ "type": "string",
54
+ "description": "The library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library.",
55
+ "x-priority": "important"
56
+ },
57
+ "buildable": {
58
+ "type": "boolean",
59
+ "default": true,
60
+ "description": "Generate a buildable library.",
61
+ "x-deprecated": "Use the `bundler` option for greater control (swc, tsc, rollup, vite, esbuild, none)."
62
+ },
63
+ "setParserOptionsProject": {
64
+ "type": "boolean",
65
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
66
+ "default": false
67
+ },
68
+ "rootProject": {
69
+ "type": "boolean",
70
+ "default": false,
71
+ "description": "Is the current project the root project in the workspace."
72
+ }
73
+ },
74
+ "required": [
75
+ "name",
76
+ "directory",
77
+ "projectNameAndRootFormat",
78
+ "publishable",
79
+ "importPath",
80
+ "buildable"
81
+ ]
82
+ }
@@ -0,0 +1,58 @@
1
+ <!-- START header -->
2
+ <!-- END header -->
3
+
4
+ # <%= name %>
5
+
6
+ <%= description %>
7
+
8
+ <!-- START doctoc -->
9
+ <!-- END doctoc -->
10
+
11
+ ## Installing
12
+
13
+ Using [pnpm](http://pnpm.io):
14
+
15
+ ```bash
16
+ pnpm add -D <%= namespace %>/<%= name %>
17
+ ```
18
+
19
+ <details>
20
+ <summary>Using npm</summary>
21
+
22
+ ```bash
23
+ npm install -D <%= namespace %>/<%= name %>
24
+ ```
25
+
26
+ </details>
27
+
28
+ <details>
29
+ <summary>Using yarn</summary>
30
+
31
+ ```bash
32
+ yarn add -D <%= namespace %>/<%= name %>
33
+ ```
34
+
35
+ </details>
36
+
37
+ ## Reduced Package Size
38
+
39
+ This project uses [tsup](https://tsup.egoist.dev/) to package the source code due to its ability to remove unused code and ship smaller javascript files thanks to code splitting. This helps to greatly reduce the size of the package and to make it easier to use in other projects.
40
+
41
+ ## Development
42
+
43
+ This project is built using [Nx](https://nx.dev). As a result, many of the usual commands are available to assist in development.
44
+
45
+ ### Building
46
+
47
+ Run `nx build <%= name %>` to build the library.
48
+
49
+ ### Running unit tests
50
+
51
+ Run `nx test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
52
+
53
+ ### Linting
54
+
55
+ Run `nx lint <%= name %>` to run [ESLint](https://eslint.org/) on the package.
56
+
57
+ <!-- START footer -->
58
+ <!-- END footer -->
@@ -0,0 +1,3 @@
1
+ import { getJestConfig } from "@storm-software/testing-tools";
2
+
3
+ export default getJestConfig("<%= directory %>", true, "<%= name %>");
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The <%= name %> library used by Storm Software for building TypeScript applications.
3
+ *
4
+ * @remarks
5
+ * <%= description %>
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+
10
+ const variable = "<%= name %>";
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
+ "types": ["jest", "node"]
6
+ },
7
+ "include": [
8
+ "jest.config.ts",
9
+ "src/**/*.test.ts",
10
+ "src/**/*.spec.ts",
11
+ "src/**/*.d.ts"
12
+ ]
13
+ }
@@ -0,0 +1,22 @@
1
+ import { LibraryGeneratorSchema } from "@nx/js/src/utils/schema";
2
+
3
+ export type NodeLibraryGeneratorSchema = Omit<
4
+ LibraryGeneratorSchema,
5
+ | "js"
6
+ | "pascalCaseFiles"
7
+ | "skipFormat"
8
+ | "skipTsConfig"
9
+ | "skipPackageJson"
10
+ | "includeBabelRc"
11
+ | "unitTestRunner"
12
+ | "linter"
13
+ | "testEnvironment"
14
+ | "config"
15
+ | "compiler"
16
+ | "bundler"
17
+ | "skipTypeCheck"
18
+ | "minimal"
19
+ > & {
20
+ name: string;
21
+ description: string;
22
+ };