@avivanco/dxp-lib-components v0.0.2
DxpLibComponents
This library was generated with Angular CLI version 12.1.0.
Code scaffolding
Run ng generate component component-name --project dxp-lib-components
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project dxp-lib-components
.
Note: Don't forget to add
--project dxp-lib-components
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build dxp-lib-components
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build dxp-lib-components
, go to the dist folder cd dist/dxp-lib-components
and run npm publish
.
Running unit tests
Run ng test dxp-lib-components
to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
##PASOS para publicar 1. En el package.json debe quedar similar de la siguiente manera:
{
"name": "@usuariogithub/dxp-lib-components",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "12.1.5",
"@angular/core": "12.1.5"
},
"dependencies": {
"tslib": "2.3.1"
},
"repository": {
"type": "git",
"url": "git@github.com:usuariogithub/npm.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}
Donde:
name: debe ir en el formato @OWNER/name, @OWNER es el nombre del repositorio en donde se va a desblegar el package url: debe ir el repositorio donde se va subir el package.
- Run
ng build dxp-lib-components
to build the project. The build artifacts will be stored in thedist/
directory. - Dependiendo del Sistema operativo va a pedir que se configure el archivo .npmrc, que se encuentra a nivel del proyecto, pero en otros casos toca autenticarse manualmente usando un access token. Para mas detalle ver: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry
npm login --scope=@OWNER --registry=https://npm.pkg.github.com
> Username: USERNAME
> Password: TOKEN
> Email: PUBLIC-EMAIL-ADDRESS
Para generar el token ir a https://github.com/settings/tokens, y dar click en generar token.
- Una vez autenticado o configurado, go to the dist folder
cd dist/dxp-lib-components
and runnpm publish
.
3 years ago