diff --git a/.gitignore b/.gitignore index f7f5069..56a79ef 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ out-tsc # dependencies node_modules +# Credenciales de registro npm (Nexus u otro). Ver .npmrc.example. +.npmrc + # IDEs and editors /.idea .project diff --git a/.npmrc.example b/.npmrc.example new file mode 100644 index 0000000..d3df147 --- /dev/null +++ b/.npmrc.example @@ -0,0 +1,21 @@ +# Copia este fichero a `.npmrc` (en la raíz del repo) y rellena los valores +# reales de tu Nexus. `.npmrc` está en .gitignore: nunca se commitea un token. +# +# Solo hace falta esto para PUBLICAR @pi/ui. Instalar paquetes públicos +# (@angular/*, rxjs, etc.) sigue yendo contra el registro público de npm salvo +# que tu Nexus también actúe de proxy/group para el scope por defecto. + +# Redirige solo el scope @pi al repositorio npm (hosted) de Nexus. +# Cambia la URL por la de tu instancia y el nombre de tu repo npm-hosted. +@pi:registry=https://nexus.tuempresa.com/repository/npm-private/ + +# Autenticación por token (recomendado, funciona igual en local y en CI). +# El token se genera en Nexus: usuario > Security > NuGet/npm token, o vía +# `npm login --registry=https://nexus.tuempresa.com/repository/npm-private/` +# (esto último escribe la línea de abajo automáticamente en tu ~/.npmrc). +//nexus.tuempresa.com/repository/npm-private/:_authToken=${NEXUS_NPM_TOKEN} + +# Nexus no es el registro público de npm: sin este flag, `npm publish` +# rechaza paquetes con scope si no lleva --access, y con un registro privado +# "restricted" es lo correcto (no lo confundas con "hazlo público en npmjs"). +always-auth=true diff --git a/apps/playground/src/app/app.config.ts b/apps/playground/src/app/app.config.ts index 62ef223..ce1cd7e 100644 --- a/apps/playground/src/app/app.config.ts +++ b/apps/playground/src/app/app.config.ts @@ -6,7 +6,6 @@ import { } from '@angular/core'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; import { provideRouter, withInMemoryScrolling } from '@angular/router'; -import { provideStore } from '@ngrx/store'; import { routes } from './app.routes'; import { @@ -16,7 +15,7 @@ import { } from '@ngx-translate/core'; import { Observable, of } from 'rxjs'; -import { IconRegistryService, deviceConfigsReducer, featureKey } from '@pi/ui'; +import { DeviceConfigsService, IconRegistryService } from '@pi/ui'; /** * Diccionario en línea: la librería resuelve los textos con `| translate`, y @@ -62,12 +61,15 @@ export const appConfig: ApplicationConfig = { // Los iconos son SVG registrados en el MatIconRegistry (assets/icons). provideAppInitializer(() => inject(IconRegistryService).init()), + // data-table, carousel y background-image leen el tipo de dispositivo; + // instanciarlo arranca el listener de breakpoints. + provideAppInitializer(() => { + inject(DeviceConfigsService); + }), + provideTranslateService({ fallbackLang: 'es', loader: { provide: TranslateLoader, useClass: PlaygroundTranslateLoader }, }), - - // data-table y background-image leen el tipo de dispositivo del store. - provideStore({ [featureKey]: deviceConfigsReducer }), ], }; diff --git a/apps/playground/src/app/app.html b/apps/playground/src/app/app.html index 8740f0d..a812adf 100644 --- a/apps/playground/src/app/app.html +++ b/apps/playground/src/app/app.html @@ -9,10 +9,19 @@
- +
+ @for (option of themeOptions; track option.value) { + + } +