@tsed/cli-core 6.0.2 → 6.0.3

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 (2) hide show
  1. package/package.json +6 -6
  2. package/readme.md +25 -58
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli-core",
3
3
  "description": "Build your CLI with TypeScript and Decorators",
4
- "version": "6.0.2",
4
+ "version": "6.0.3",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@npmcli/run-script": "9.0.0",
35
- "@tsed/logger": ">=6.1.1",
35
+ "@tsed/logger": ">=7.0.1",
36
36
  "@tsed/normalize-path": ">=7.14.2",
37
37
  "@types/fs-extra": "^11.0.4",
38
38
  "@types/inquirer": "^9.0.7",
@@ -66,7 +66,7 @@
66
66
  "uuid": "^10.0.0"
67
67
  },
68
68
  "devDependencies": {
69
- "@tsed/typescript": "6.0.2",
69
+ "@tsed/typescript": "6.0.3",
70
70
  "@types/commander": "2.12.2",
71
71
  "@types/consolidate": "0.14.4",
72
72
  "@types/figures": "3.0.1",
@@ -83,9 +83,9 @@
83
83
  "vitest": "2.1.1"
84
84
  },
85
85
  "peerDependencies": {
86
- "@tsed/core": ">=8.0.0-rc.6",
87
- "@tsed/di": ">=8.0.0-rc.6",
88
- "@tsed/hooks": ">=8.0.0-rc.6"
86
+ "@tsed/core": ">=8.0.0",
87
+ "@tsed/di": ">=8.0.0",
88
+ "@tsed/hooks": ">=8.0.0"
89
89
  },
90
90
  "repository": "https://github.com/tsedio/tsed-cli",
91
91
  "bugs": {
package/readme.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @tsed/cli-core
2
2
 
3
3
  <p style="text-align: center" align="center">
4
- <a href="https://tsed.io" target="_blank"><img src="https://tsed.io/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
4
+ <a href="https://tsed.dev" target="_blank"><img src="https://tsed.dev/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
5
5
  </p>
6
6
 
7
7
  [![Build & Release](https://github.com/tsedio/tsed-cli/workflows/Build%20&%20Release/badge.svg?branch=master)](https://github.com/tsedio/tsed-cli/actions?query=workflow%3A%22Build+%26+Release%22)
@@ -29,7 +29,7 @@ cli-plugin and deploy it on npm registry.
29
29
  - Decorators,
30
30
  - Extensible with plugins architecture.
31
31
 
32
- Please refer to the [documentation](https://cli.tsed.io/) for more details.
32
+ Please refer to the [documentation](https://cli.tsed.dev/) for more details.
33
33
 
34
34
  ## Installation
35
35
 
@@ -53,8 +53,8 @@ Here a structure directory example:
53
53
  │ └── index.ts
54
54
  ├── templates -- Template files
55
55
  ├── package.json
56
- ├── tsconfig.json
57
- └── tsconfig.compile.json
56
+ ├── tsconfig.json
57
+ └── tsconfig.compile.json
58
58
  ```
59
59
 
60
60
  ## Create package.json and tsconfig
@@ -70,12 +70,7 @@ The first step is to create the package.json with the following lines:
70
70
  "bin": {
71
71
  "tsed": "lib/bin/{{name}}.js"
72
72
  },
73
- "files": [
74
- "lib/bin/{{name}}.js",
75
- "lib/bin",
76
- "lib",
77
- "templates"
78
- ],
73
+ "files": ["lib/bin/{{name}}.js", "lib/bin", "lib", "templates"],
79
74
  "description": "An awesome CLI build on top of @tsed/cli-core",
80
75
  "dependencies": {
81
76
  "@tsed/cli-core": "1.3.1",
@@ -119,21 +114,13 @@ Then create tsconfig files one for the IDE (`tsconfig.json`):
119
114
  "importHelpers": true,
120
115
  "newLine": "LF",
121
116
  "noEmit": true,
122
- "lib": [
123
- "es7",
124
- "dom",
125
- "esnext.asynciterable"
126
- ],
127
- "typeRoots": [
128
- "./node_modules/@types"
129
- ]
117
+ "lib": ["es7", "dom", "esnext.asynciterable"],
118
+ "typeRoots": ["./node_modules/@types"]
130
119
  },
131
120
  "linterOptions": {
132
- "exclude": [
133
- ]
121
+ "exclude": []
134
122
  },
135
- "exclude": [
136
- ]
123
+ "exclude": []
137
124
  }
138
125
  ```
139
126
 
@@ -153,12 +140,7 @@ And another one to compile source (`tsconfig.compile.json`):
153
140
  "noEmit": false,
154
141
  "inlineSources": true
155
142
  },
156
- "exclude": [
157
- "node_modules",
158
- "test",
159
- "lib",
160
- "**/*.spec.ts"
161
- ]
143
+ "exclude": ["node_modules", "test", "lib", "**/*.spec.ts"]
162
144
  }
163
145
  ```
164
146
 
@@ -176,33 +158,23 @@ import {resolve} from "path";
176
158
  const pkg = require("../../package.json");
177
159
  const TEMPLATE_DIR = resolve(__dirname, "..", "..", "templates");
178
160
 
179
- CliCore
180
- .bootstrap({
181
- commands: [
182
- AddCmd, // CommandProvider to install a plugin
183
- // then add you commands
184
- ],
185
-
186
- // optionals
187
- name: "name", // replace by the cli name. This property will be used by Plugins command
188
- pkg,
189
- templateDir: TEMPLATE_DIR
190
- })
191
- .catch(console.error)
161
+ CliCore.bootstrap({
162
+ commands: [
163
+ AddCmd // CommandProvider to install a plugin
164
+ // then add you commands
165
+ ],
166
+
167
+ // optionals
168
+ name: "name", // replace by the cli name. This property will be used by Plugins command
169
+ pkg,
170
+ templateDir: TEMPLATE_DIR
171
+ }).catch(console.error);
192
172
  ```
193
173
 
194
174
  ## Create your first command
195
175
 
196
176
  ```typescript
197
- import {
198
- Command,
199
- CommandProvider,
200
- ClassNamePipe,
201
- OutputFilePathPipe,
202
- Inject,
203
- RoutePipe,
204
- SrcRendererService
205
- } from "@tsed/cli-core";
177
+ import {Command, CommandProvider, ClassNamePipe, OutputFilePathPipe, Inject, RoutePipe, SrcRendererService} from "@tsed/cli-core";
206
178
 
207
179
  export interface GenerateCmdContext {
208
180
  type: string;
@@ -296,12 +268,7 @@ export class GenerateCmd implements CommandProvider {
296
268
  Finally, create a handlebars template in templates directory:
297
269
 
298
270
  ```hbs
299
- import {Injectable} from "@tsed/di";
300
-
301
- @Injectable()
302
- export class {{symbolName}} {
303
-
304
- }
271
+ import {Injectable} from "@tsed/di"; @Injectable() export class {{symbolName}} { }
305
272
  ```
306
273
 
307
274
  ## Run command in dev mode
@@ -325,11 +292,11 @@ Here other commands examples:
325
292
  - Init a project command: https://github.com/tsedio/tsed-cli/tree/master/packages/cli/src/commands/init/InitCmd
326
293
  - Generate command: https://github.com/tsedio/tsed-cli/tree/master/packages/cli/src/commands/generate/GenerateCmd
327
294
  - Plugin example: https://github.com/tsedio/tsed-cli/tree/master/packages/cli-plugin-mocha
328
- - Mono repo CLI: https://github.com/tsedio/tsed-cli/tree/master
295
+ - Mono repo CLI: https://github.com/tsedio/tsed-cli/tree/master
329
296
 
330
297
  ## Contributors
331
298
 
332
- Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html)
299
+ Please read [contributing guidelines here](https://tsed.dev/CONTRIBUTING.html)
333
300
 
334
301
  <a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
335
302