@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.
- package/CHANGELOG.md +12 -0
- package/declarations.d.ts +129 -0
- package/executors.json +35 -0
- package/generators.json +53 -0
- package/index.js +4 -2410
- package/meta.json +1 -1
- package/package.json +16 -2
- package/src/executors/npm-publish/schema.d.ts +8 -0
- package/src/executors/npm-publish/schema.json +26 -0
- package/src/executors/tsup/executor.js +4 -2410
- package/src/executors/tsup/schema.d.ts +48 -0
- package/src/executors/tsup/schema.json +223 -0
- package/src/executors/tsup-browser/executor.js +4 -2410
- package/src/executors/tsup-browser/schema.d.ts +9 -0
- package/src/executors/tsup-browser/schema.json +11 -0
- package/src/executors/tsup-neutral/executor.js +4 -2410
- package/src/executors/tsup-neutral/schema.d.ts +5 -0
- package/src/executors/tsup-neutral/schema.json +11 -0
- package/src/executors/tsup-node/executor.js +4 -2410
- package/src/executors/tsup-node/schema.d.ts +7 -0
- package/src/executors/tsup-node/schema.json +20 -0
- package/src/executors/typia/schema.d.ts +6 -0
- package/src/executors/typia/schema.json +38 -0
- package/src/generators/browser-library/files/README.md +58 -0
- package/src/generators/browser-library/files/jest.config.ts +3 -0
- package/src/generators/browser-library/files/src/index.ts.template +10 -0
- package/src/generators/browser-library/files/tsconfig.spec.json +13 -0
- package/src/generators/browser-library/schema.d.ts +22 -0
- package/src/generators/browser-library/schema.json +82 -0
- package/src/generators/config-schema/schema.d.ts +3 -0
- package/src/generators/config-schema/schema.json +20 -0
- package/src/generators/init/schema.d.ts +3 -0
- package/src/generators/init/schema.json +16 -0
- package/src/generators/neutral-library/files/README.md +58 -0
- package/src/generators/neutral-library/files/jest.config.ts +3 -0
- package/src/generators/neutral-library/files/src/index.ts.template +10 -0
- package/src/generators/neutral-library/files/tsconfig.spec.json +13 -0
- package/src/generators/neutral-library/schema.d.ts +6 -0
- package/src/generators/neutral-library/schema.json +82 -0
- package/src/generators/node-library/files/README.md +58 -0
- package/src/generators/node-library/files/jest.config.ts +3 -0
- package/src/generators/node-library/files/src/index.ts.template +10 -0
- package/src/generators/node-library/files/tsconfig.spec.json +13 -0
- package/src/generators/node-library/schema.d.ts +22 -0
- package/src/generators/node-library/schema.json +82 -0
- package/src/generators/preset/files/.all-contributorsrc.template +48 -0
- package/src/generators/preset/files/.editorconfig +454 -0
- package/src/generators/preset/files/.env.template +43 -0
- package/src/generators/preset/files/.gitattributes +52 -0
- package/src/generators/preset/files/.github/.nvmrc +1 -0
- package/src/generators/preset/files/.github/.whitesource +14 -0
- package/src/generators/preset/files/.github/CODEOWNERS +1 -0
- package/src/generators/preset/files/.github/CODE_OF_CONDUCT.md +125 -0
- package/src/generators/preset/files/.github/CONTRIBUTING.md.template +15 -0
- package/src/generators/preset/files/.github/FUNDING.yml +3 -0
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/bug-report.yml.template +102 -0
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/documentation.yml.template +56 -0
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/feature-request.yml.template +60 -0
- package/src/generators/preset/files/.github/PULL_REQUEST_TEMPLATE.md.template +39 -0
- package/src/generators/preset/files/.github/SECURITY.md +9 -0
- package/src/generators/preset/files/.github/actions/setup-workspace/action.yaml +41 -0
- package/src/generators/preset/files/.github/codecov.yml +29 -0
- package/src/generators/preset/files/.github/labels.yml +78 -0
- package/src/generators/preset/files/.github/renovate.json.template +51 -0
- package/src/generators/preset/files/.github/stale.yml +50 -0
- package/src/generators/preset/files/.github/workflows/build-release.yml.template +94 -0
- package/src/generators/preset/files/.github/workflows/code-review.yml +18 -0
- package/src/generators/preset/files/.github/workflows/codeql.yml +84 -0
- package/src/generators/preset/files/.github/workflows/git-guardian.yml +23 -0
- package/src/generators/preset/files/.github/workflows/greetings.yml +24 -0
- package/src/generators/preset/files/.github/workflows/labels.yml +31 -0
- package/src/generators/preset/files/.github/workflows/lock.yml +26 -0
- package/src/generators/preset/files/.log4brains.yml.template +5 -0
- package/src/generators/preset/files/.markdownlint.json +28 -0
- package/src/generators/preset/files/.verdaccio/config.yml.template +40 -0
- package/src/generators/preset/files/.vscode/README.md +32 -0
- package/src/generators/preset/files/.vscode/cspell.json +3 -0
- package/src/generators/preset/files/.vscode/extensions.json +14 -0
- package/src/generators/preset/files/.vscode/launch.json +37 -0
- package/src/generators/preset/files/.vscode/settings.json +316 -0
- package/src/generators/preset/files/.vscode/tasks.json +19 -0
- package/src/generators/preset/files/LICENSE +201 -0
- package/src/generators/preset/files/README.md.template +273 -0
- package/src/generators/preset/files/assets/diagrams/.gitkeep +0 -0
- package/src/generators/preset/files/assets/icons/dark/.gitkeep +0 -0
- package/src/generators/preset/files/assets/icons/light/.gitkeep +0 -0
- package/src/generators/preset/files/assets/logos/.gitkeep +0 -0
- package/src/generators/preset/files/biome.json +4 -0
- package/src/generators/preset/files/docs/api-reference/.gitkeep +0 -0
- package/src/generators/preset/files/docs/readme-templates/README.footer.md.template +94 -0
- package/src/generators/preset/files/docs/readme-templates/README.header.md.template +17 -0
- package/src/generators/preset/files/lefthook.json +6 -0
- package/src/generators/preset/files/nx.json +3 -0
- package/src/generators/preset/files/pnpm-workspace.yaml +6 -0
- package/src/generators/preset/files/socket.yaml +20 -0
- package/src/generators/preset/files/tsconfig.base.json.template +11 -0
- package/src/generators/preset/schema.d.ts +14 -0
- package/src/generators/preset/schema.json +103 -0
- package/src/generators/release-version/schema.d.ts +3 -0
- package/src/generators/release-version/schema.json +66 -0
- package/src/utils/index.js +4 -2410
|
@@ -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,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,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,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,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,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,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
|
+
};
|