-
Notifications
You must be signed in to change notification settings - Fork 8
feat: updated cli docs with cli commands #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,204 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| title: Commands | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <head> | ||||||||||||||||||||||
| <title>Stencil-Cli Commands Setup</title> | ||||||||||||||||||||||
| </head> | ||||||||||||||||||||||
| <p> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Build Command | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Compiles an application or workspace into an output folder. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| $ stencil build <name> [options] | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Arguments** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Argument | Description | | ||||||||||||||||||||||
| | -------- | --------------------------------- | | ||||||||||||||||||||||
| | `<name>` | The name of the project to build. | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Options** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Option | Description | | ||||||||||||||||||||||
| | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||||||||||||||||||||||
| | `--path [path]` | Path to `tsconfig` file. <br/>Alias `-p` | | ||||||||||||||||||||||
| | `--config [path]` | Path to `nest-cli` configuration file. <br/>Alias `-c` | | ||||||||||||||||||||||
| | `--watch` | Run in watch mode (live-reload).<br /> If you're using `tsc` for compilation, you can type `rs` to restart the application (when `manualRestart` option is set to `true`). <br/>Alias `-w` | | ||||||||||||||||||||||
| | `--builder [name]` | Specify the builder to use for compilation (`tsc`, `swc`, or `webpack`). <br/>Alias `-b` | | ||||||||||||||||||||||
| | `--webpack` | Use webpack for compilation (deprecated: use `--builder webpack` instead). | | ||||||||||||||||||||||
| | `--webpackPath` | Path to webpack configuration. | | ||||||||||||||||||||||
| | `--tsc` | Force use `tsc` for compilation. | | ||||||||||||||||||||||
| ## Start Command | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Compiles and runs an application (or default project in a workspace). | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| $ stencil start <name> [options] | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider showing command output for the Start Command. Including example outputs in documentation can greatly enhance user comprehension and reduce confusion. + # Example output:
+ $ Starting project 'name'...Committable suggestion
Suggested change
ToolsMarkdownlint
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Arguments** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Argument | Description | | ||||||||||||||||||||||
| | -------- | ------------------------------- | | ||||||||||||||||||||||
| | `<name>` | The name of the project to run. | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Options** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Option | Description | | ||||||||||||||||||||||
| | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | | ||||||||||||||||||||||
| | `--path [path]` | Path to `tsconfig` file. <br/>Alias `-p` | | ||||||||||||||||||||||
| | `--config [path]` | Path to `nest-cli` configuration file. <br/>Alias `-c` | | ||||||||||||||||||||||
| | `--watch` | Run in watch mode (live-reload) <br/>Alias `-w` | | ||||||||||||||||||||||
| | `--builder [name]` | Specify the builder to use for compilation (`tsc`, `swc`, or `webpack`). <br/>Alias `-b` | | ||||||||||||||||||||||
| | `--preserveWatchOutput` | Keep outdated console output in watch mode instead of clearing the screen. (`tsc` watch mode only) | | ||||||||||||||||||||||
| | `--watchAssets` | Run in watch mode (live-reload), watching non-TS files (assets). See [Assets](cli/monorepo#assets) for more details. | | ||||||||||||||||||||||
| | `--debug [hostport]` | Run in debug mode (with --inspect flag) <br/>Alias `-d` | | ||||||||||||||||||||||
| | `--webpack` | Use webpack for compilation. (deprecated: use `--builder webpack` instead) | | ||||||||||||||||||||||
| | `--webpackPath` | Path to webpack configuration. | | ||||||||||||||||||||||
| | `--tsc` | Force use `tsc` for compilation. | | ||||||||||||||||||||||
| | `--exec [binary]` | Binary to run (default: `node`). <br/>Alias `-e` | | ||||||||||||||||||||||
| | `-- [key=value]` | Command-line arguments that can be referenced with `process.argv`. | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Add Command | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Imports a library that has been packaged as a **nest library**, running its install schematic. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| stencil add <name> [options] | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an example output for the Add Command. Providing output examples can help users verify that they have executed the command correctly. + # Example output:
+ $ Library 'name' added successfully.
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Arguments** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Argument | Description | | ||||||||||||||||||||||
| | -------- | ---------------------------------- | | ||||||||||||||||||||||
| | `<name>` | The name of the library to import. | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Info Command | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
| stencil info | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an example output for the Info Command. Example outputs are particularly useful for simple commands to confirm their successful execution. + # Example output:
+ $ Stencil package version: 1.0.0
+ $ System info: Windows 10, 64-bit
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Displays information about installed stencil packages and other helpful system info. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## List Command | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
| stencil list | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an example output for the List Command. Showing users what to expect from the output can help them understand the command's utility. + # Example output:
+ $ Installed services: Service1, Service2
+ $ Package managers: npm, yarnCommittable suggestion
Suggested change
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Consoles a registry/spec file which shows all the installed services along with installed package manager. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Docker Command | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
| stencil docker <services...> | ||||||||||||||||||||||
| stencil do <services...> | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
Comment on lines
+99
to
+101
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an example output for the Docker Command. Providing example outputs can demystify what might otherwise be a complex command for users. + # Example output:
+ $ Docker service 'service1' created successfully.
ToolsMarkdownlint
|
||||||||||||||||||||||
| **Description** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Creates a docker service/container for given prompt. | ||||||||||||||||||||||
| - Tooling specific setup | ||||||||||||||||||||||
| - Creates a folder with the given `<service>` inside docker directory | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix Indentation in Markdown Lists There are inconsistencies in the indentation for unordered lists. This should be corrected to ensure uniformity and adherence to markdown best practices. - - Creates a folder with the given `<service>` inside docker directory
- - Creates a docker compose or updates existing docker compose with desired `<service>`
+ - Creates a folder with the given `<service>` inside docker directory
+ - Creates a docker compose or updates existing docker compose with desired `<service>`Also applies to: 108-108 ToolsMarkdownlint
|
||||||||||||||||||||||
| - À la Carte setup | ||||||||||||||||||||||
| - Creates a docker compose or updates existing docker compose with desired `<service>` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Arguments** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Argument | Description | | ||||||||||||||||||||||
| |-----------|--------------| | ||||||||||||||||||||||
| | `<service>` | The name of the new project | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Note: Docker command supports multiple services at a time. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Services** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - Tooling specific setup | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Name | Alias | Description | | ||||||||||||||||||||||
| |---|---|---| | ||||||||||||||||||||||
| | `logging` | `lg` | Generates a docker service for logging | | ||||||||||||||||||||||
| | `monitoringService` |`ms` | Generates a docker service for monitoring | | ||||||||||||||||||||||
| | `temporal` | `tp` | Generates a docker service for temporal | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - À la Carte setup | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Name | Alias | Description | | ||||||||||||||||||||||
| |---|---|---| | ||||||||||||||||||||||
| | `postgres` | `pg` | Generate a docker compose for postgres | | ||||||||||||||||||||||
| | `hasura` |`hs` | Generate a docker compose for hasura | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Generate Command | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
| stencil generate <schematic> <name> [options] | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| stencil g <schematic> <name> [options] | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
Comment on lines
+142
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an example output for the Generate Command. Example outputs can clarify the immediate results of the command, helping users to verify correct execution. + # Example output:
+ $ Generated 'newApp' from 'app' schematic successfully.Committable suggestion
Suggested change
ToolsMarkdownlint
|
||||||||||||||||||||||
| **Description** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Generates and/or modifies files based on a schematic | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Arguments** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Argument | Description | | ||||||||||||||||||||||
| |-----------|--------------| | ||||||||||||||||||||||
| | `<service>` | The schematic or collection:schematic to generate. See the table below for the available schematics. | | ||||||||||||||||||||||
| | `<name>` | The name of the new project | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Schematics** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Name | Alias | Description | | ||||||||||||||||||||||
| |---|---|---| | ||||||||||||||||||||||
| | `app` | | Generate a new application within a monorepo (converting to monorepo if it's a standard structure). | | ||||||||||||||||||||||
| | `library` |`lib` | Generate a new library within a monorepo (converting to monorepo if it's a standard structure). | | ||||||||||||||||||||||
| | `class` |`cl` | Generate a new class.| | ||||||||||||||||||||||
| | `controller` |`co` | Generate a controller declaration.| | ||||||||||||||||||||||
| | `decorator` |`d` | Generate a custom decorator. | | ||||||||||||||||||||||
| | `filter` |`f` | Generate a filter declaration. | | ||||||||||||||||||||||
| | `gateway` |`ga` | Generate a gateway declaration. | | ||||||||||||||||||||||
| | `guard` |`gu` | Generate a guard declaration. | | ||||||||||||||||||||||
| | `interface` |`itf` | Generate an interface. | | ||||||||||||||||||||||
| | `interceptor` |`itc` | Generate an interceptor declaration. | | ||||||||||||||||||||||
| | `middleware` |`mi` | Generate a middleware declaration. | | ||||||||||||||||||||||
| | `module` |`mo` | Generate a module declaration. | | ||||||||||||||||||||||
| | `pipe` |`pi` | Generate a pipe declaration. | | ||||||||||||||||||||||
| | `provider` |`pr` | Generate a provider declaration. | | ||||||||||||||||||||||
| | `resolver` |`r` | Generate a resolver declaration. | | ||||||||||||||||||||||
| | `resource` |`res` | Generate a new CRUD resource. See the CRUD (resource) generator for more details. (TS only) | | ||||||||||||||||||||||
| | `service` |`s` | Generate a service declaration.| | ||||||||||||||||||||||
| | `sub-app` |`app` | Generate a new application within a monorepo | | ||||||||||||||||||||||
| | `service-prisma` |`sp` | Generate the Prisma service file | | ||||||||||||||||||||||
| | `service-user` |`su` | Add the User Service module from the package. | | ||||||||||||||||||||||
| | `fixtures` |`fs` | Generate Custom Fixtures Files. | | ||||||||||||||||||||||
| | `husky` |`hs` | Generate Custom husky Files. | | ||||||||||||||||||||||
| | `github` |`gh` | Generate Custom github Files. | | ||||||||||||||||||||||
| | `prisma` |`ps` | Add custom prisma models to the schema.prisma file. | | ||||||||||||||||||||||
| | `devcontainer` |`dc` | Generate files in a .devcontainer file | | ||||||||||||||||||||||
| | `monitoring` |`mf` | Generate monitor folder. | | ||||||||||||||||||||||
| | `service-temporal` |`te` | If you want to have temporal setup in the project. | | ||||||||||||||||||||||
| | `service-file-upload` |`fu` | If you want to have fileUpload setup in the project. | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| **Options** | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Option | Alias | Description | | ||||||||||||||||||||||
| | ------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------- | | ||||||||||||||||||||||
| | `--dry-run` | `-d` | Reports changes that would be made, but does not change the filesystem. | | ||||||||||||||||||||||
| | `--project [project]` | `-p` | Project that element should be added to. | | ||||||||||||||||||||||
| | `--flat` | | Do not generate a folder for the element. | | ||||||||||||||||||||||
| | `--collection [collectionName]` | `-c` | Specify schematics collection. Use package name of installed npm package containing schematic. | | ||||||||||||||||||||||
| | `--spec` | | Enforce spec files generation (default) | | ||||||||||||||||||||||
| | `--no-spec` | | Disable spec files generation | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| </p> | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider showing command output for clarity.
It's a good practice to show the expected output of commands in documentation to help users understand what to expect.
Tools
Markdownlint