alfresco-content-app/docs/extending/publish-to-npm.md
AleksanderSklorz e9bc42df10
[ACS-4534] nx workspace support for aca (#3143)
* ACS-4534 Added nx workspace support

* ACS-4534 Updated package-lock.json file

* ACS-4534 Configured cache directory and affected command

* ACS-4534 Updated README

* ACS-4534 Updated more README files

* ACS-4534 Fixed lint

* ACS-4534 Address comment for readme

* ACS-4534 Removed redundant build-libs script

* ACS-4534 Fixed start script

* ACS-4534 Updated some left documentation

* ACS-4534 Added more helper scripts, addressed PR comments

* ACS-4534 Updated package-lock.json after rebasing

* ACS-4534 Fix stylelint issue
2023-04-25 15:34:34 +02:00

42 lines
845 B
Markdown

---
Title: Publish to npm
---
## Create a new library
New library can be created using standard `ng` command
e.g. if we would like to create `aca-new-lib` we need to run the following:
```sh
ng generate @schematics/angular:library aca-new-lib
```
## Publish library
### Build library
In order to publish new library, we need to build it first. Building is done by following command from `package.json`
```sh
"build": "nx build content-ce"
```
### Update publish script
If we would like to publish the new library we need to update `scripts/gh/npm-publish.sh`
The only thing that need to be done is to update `PROJECTS` variable by adding your library name i.e.
```sh
PROJECTS=(
'aca-shared',
'aca-new-lib'
);
```
## Caveats
- The versions of libraries are updated automatically by the script (should not be done manually)