@storm-software/workspace-tools 1.21.19 → 1.22.1
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 +17 -0
- package/README.md +29 -2
- package/generators.json +6 -1
- package/index.js +154 -126
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/schema.d.ts +6 -6
- 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 +3 -3
- package/src/generators/node-library/generator.js +23195 -23165
- package/src/generators/node-library/schema.json +1 -1
package/package.json
CHANGED
|
@@ -20,17 +20,17 @@ export type TsupExecutorSchema = Omit<
|
|
|
20
20
|
| "platform"
|
|
21
21
|
> & {
|
|
22
22
|
entry: string;
|
|
23
|
-
options
|
|
24
|
-
clean
|
|
25
|
-
debug
|
|
23
|
+
options?: Options;
|
|
24
|
+
clean?: boolean;
|
|
25
|
+
debug?: boolean;
|
|
26
26
|
banner?: string;
|
|
27
|
-
verbose
|
|
27
|
+
verbose?: boolean;
|
|
28
28
|
define?: Record<string, string>;
|
|
29
29
|
env?: Record<string, string>;
|
|
30
30
|
apiReport?: boolean;
|
|
31
31
|
docModel?: boolean;
|
|
32
32
|
tsdocMetadata?: boolean;
|
|
33
33
|
includeSrc?: boolean;
|
|
34
|
-
platform
|
|
35
|
-
plugins
|
|
34
|
+
platform?: Platform;
|
|
35
|
+
plugins?: any[];
|
|
36
36
|
};
|
|
@@ -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
|
+
}
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
Using [pnpm](http://pnpm.io):
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
pnpm add -D
|
|
16
|
+
pnpm add -D <%= namespace %>/<%= name %>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
<details>
|
|
20
20
|
<summary>Using npm</summary>
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npm install -D
|
|
23
|
+
npm install -D <%= namespace %>/<%= name %>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
</details>
|
|
@@ -29,7 +29,7 @@ npm install -D @<%= namespace %>/<%= name %>
|
|
|
29
29
|
<summary>Using yarn</summary>
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
yarn add -D
|
|
32
|
+
yarn add -D <%= namespace %>/<%= name %>
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
</details>
|