|
7 | 7 | [![Discord Server][discord-image]][discord-url]
|
8 | 8 |
|
9 | 9 | <!-- Images -->
|
| 10 | + |
10 | 11 | [npm-image]: https://badge.fury.io/js/ngx-deploy-npm.svg
|
11 | 12 | [mit-licence-image]: https://img.shields.io/badge/license-MIT-orange.svg?color=blue&style=flat-square
|
12 | 13 | [conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
|
13 | 14 | [discord-image]: https://img.shields.io/discord/748677963142135818?color=7289DA&label=%23ngx-deploy-npm&logo=discord&logoColor=white&style=flat-square
|
14 | 15 |
|
15 | 16 | <!-- URLs -->
|
| 17 | + |
16 | 18 | [npm-url]: https://www.npmjs.com/package/ngx-deploy-npm
|
17 | 19 | [mit-licence-url]: http://opensource.org/licenses/MIT
|
18 | 20 | [discord-url]: https://discord.gg/cPa78y6rXn
|
19 | 21 | [conventional-commits-url]: https://conventionalcommits.org
|
20 | 22 |
|
21 | 23 | 
|
22 | 24 |
|
23 |
| -## Publish any kind of library to NPM on an Angular🅰️ or Nx🐬 Workspace |
| 25 | +## Publish your libraries to NPM with one command on an Angular🅰️ or Nx🐬 workspace |
24 | 26 |
|
25 | 27 | ---
|
26 | 28 |
|
@@ -56,7 +58,7 @@ package created and you already are logged in on npm using `npm login`
|
56 | 58 |
|
57 | 59 | 1. Add `ngx-deploy-npm` to your project. It will configure all your publishable libraries present in the project
|
58 | 60 |
|
59 |
| - | Angular🅰️ | Nx🐬 | |
| 61 | + | Angular🅰️ | Nx🐬 | |
60 | 62 | | :------------------------------------------- | :----------------------------------------------------- |
|
61 | 63 | | <pre lang="sh"> ng add ngx-deploy-npm </pre> | <pre lang="sh"> nx generate ngx-deploy-npm:init </pre> |
|
62 | 64 |
|
@@ -88,16 +90,18 @@ Independently of the CI/CD that you are using you must create an NPM token. To d
|
88 | 90 | - Creating a step with `run: npm whoami`
|
89 | 91 | - The output should be the username of your npm account
|
90 | 92 | 4. **Deploy your package**
|
| 93 | + |
91 | 94 | - Create a step with:
|
92 | 95 |
|
93 |
| - | Angular🅰️ | Nx🐬 | |
| 96 | + | Angular🅰️ | Nx🐬 | |
94 | 97 | | :-------------------------------------------- | :-------------------------------------------- |
|
95 | 98 | | <pre lang="sh"> ng deploy your-library </pre> | <pre lang="sh"> nx deploy your-library </pre> |
|
96 | 99 |
|
97 | 100 | - **NOTE:** You may want to execute a script that executes some pre-steps
|
98 |
| - before publishing and inside that script execute`ng/nx deploy YOUR_LIBRARY`. |
99 |
| - If you want to make that script on JavaScript and put it on the package.json, |
100 |
| - **execute it using `npm` not with yarn**, there is an [issue](https://github.com/yarnpkg/yarn/issues/5683) associated with that |
| 101 | + before publishing and inside that script execute`ng/nx deploy YOUR_LIBRARY`. |
| 102 | + If you want to make that script on JavaScript and put it on the package.json, |
| 103 | + **execute it using `npm` not with yarn**, there is an [issue](https://github.com/yarnpkg/yarn/issues/5683) associated with that |
| 104 | + |
101 | 105 | 5. **Enjoy your just released package 🎉📦**
|
102 | 106 |
|
103 | 107 | The job full example is for an Angular project is
|
@@ -134,6 +138,7 @@ Same as `ng build --configuration=XXX`.
|
134 | 138 | This command has no effect if the option `--no-build` option is active.
|
135 | 139 |
|
136 | 140 | #### --no-build
|
| 141 | + |
137 | 142 | - **optional**
|
138 | 143 | - Default: `false` (string)
|
139 | 144 | - Example:
|
|
0 commit comments