diff --git a/libs/compodoc/README.md b/libs/compodoc/README.md index c0df98e..5e47eea 100644 --- a/libs/compodoc/README.md +++ b/libs/compodoc/README.md @@ -22,14 +22,14 @@ Add the plugin to your Nx workspace: ``` -ng add @twittwer/compodoc +nx add @twittwer/compodoc // adds `@compdoc/compodoc` & `@twittwer/compodoc` as devDependencies ``` Configure Compodoc for a project: ``` -ng g @twittwer/compodoc:config +nx g @twittwer/compodoc:config // adds a `compodoc` target to the specified project in your `angular.json` ``` @@ -38,7 +38,7 @@ ng g @twittwer/compodoc:config Add Compodoc target to a project: ``` -ng g @twittwer/compodoc:config [options] +nx g @twittwer/compodoc:config [options] ``` | Option | Default | Description | @@ -51,9 +51,9 @@ Generate Compodoc documentation for a project: ``` // HTML Format -ng run :compodoc +nx run :compodoc // JSON Format -ng run :compodoc:json +nx run :compodoc:json ``` The builder supports several configuration options which are passed to the Compodoc command. @@ -143,15 +143,15 @@ The options can be defined in the `angular.json`: > Compodoc of the whole workspace incl. all project READMEs (apps/libs) as additional documentation. - Create a library for shared/workspace wide tooling (e.g. `tools`) - `ng g @nrwl/(workspace|angular):library [--unitTestRunner=none]` - `ng g @nrwl/workspace:library tools --unitTestRunner=none` + `nx g @nrwl/(workspace|angular):library [--unitTestRunner=none]` + `nx g @nrwl/workspace:library tools --unitTestRunner=none` - Optionally you can delete some unused code (you should keep at least `tsconfig.json` & `README.md`). - Configure Compodoc for the created project - `ng g @twittwer/compodoc:config --workspaceDocs` - `ng g @twittwer/compodoc:config tools --workspaceDocs` + `nx g @twittwer/compodoc:config --workspaceDocs` + `nx g @twittwer/compodoc:config tools --workspaceDocs` - Generate your docs: - `ng run :compodoc` - `ng run tools:compodoc` + `nx run :compodoc` + `nx run tools:compodoc` ### Watch Mode @@ -160,8 +160,8 @@ The options can be defined in the `angular.json`: The watch mode can be activated via argument: ```shell script -ng run :compodoc --watch -ng run :compodoc:json --watch +nx run :compodoc --watch +nx run :compodoc:json --watch ``` or via additional configuration: @@ -207,8 +207,8 @@ Configure `storybook-watch` & `storybook-build` targets in `angular.json`: builder: '@nrwl/workspace:run-commands', options: { commands: [ - 'npx ng run :compodoc:json-watch', - 'npx ng run :storybook', + 'npx nx run :compodoc:json-watch', + 'npx nx run :storybook', ], }, }, @@ -216,8 +216,8 @@ Configure `storybook-watch` & `storybook-build` targets in `angular.json`: builder: '@nrwl/workspace:run-commands', options: { commands: [ - 'npx ng run :compodoc:json', - 'npx ng run :build-storybook', + 'npx nx run :compodoc:json', + 'npx nx run :build-storybook', ], }, }, @@ -239,8 +239,8 @@ setCompodocJson(compodocJson); Run or build it: ```shell script -ng run :storybook-watch -ng run :storybook-build +nx run :storybook-watch +nx run :storybook-build ```