ngx-sp-auth 2.1.0 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +206 -206
- package/fesm2022/ngx-sp-auth.mjs +33 -33
- package/fesm2022/ngx-sp-auth.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,207 +1,207 @@
|
|
|
1
|
-
# NgxSpAuth - Biblioteca de Login 🔐
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
# Introdução 📝
|
|
8
|
-
|
|
9
|
-
Esta biblioteca fornece componentes de telas relacionadas a autenticação.
|
|
10
|
-
|
|
11
|
-
# Recursos 🚀
|
|
12
|
-
|
|
13
|
-
✅ Autenticação de usuários com tenant, usuario e senha;
|
|
14
|
-
|
|
15
|
-
✅ Recuperação de senha;
|
|
16
|
-
|
|
17
|
-
✅ Menu Lateral liberado após Login.
|
|
18
|
-
|
|
19
|
-
# Instalação e configuração 📥
|
|
20
|
-
|
|
21
|
-
1️⃣ Instalar a biblioteca - utilizando o comando "npm install ngx-sp-auth";
|
|
22
|
-
|
|
23
|
-
2️⃣ Configurar o sistema para utilizar os componentes (somente para projetos que nunca utilizaram essa biblioteca);
|
|
24
|
-
|
|
25
|
-
2.1. Substituir referência do import { AuthStorageService } from 'src/app/auth/storage/auth-storage.service'
|
|
26
|
-
para import { AuthStorageService } from 'ngx-sp-auth';
|
|
27
|
-
|
|
28
|
-
2.2. Verificar se existe mais alguma referência para algum arquivo dentro do diretório "src/app/auth/" e substitua a importação para "ngx-sp-auth",
|
|
29
|
-
isso depende de cada projeto.
|
|
30
|
-
|
|
31
|
-
2.3. Adicionar/Alterar os seguintes trechos de código do projeto.
|
|
32
|
-
|
|
33
|
-
- import { AuthGuard, LoginComponent, NovaSenhaComponent } from "ngx-sp-auth";
|
|
34
|
-
|
|
35
|
-
- No seu APP_ROUTES colocar as rotas abaixo.
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
{
|
|
39
|
-
path: "auth/login",
|
|
40
|
-
component: LoginComponent,
|
|
41
|
-
canLoad: [LoginGuard]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
path: 'auth/login/novaSenha/:param',
|
|
45
|
-
component: NovaSenhaComponent,
|
|
46
|
-
canLoad: [LoginGuard]
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
- No seu app-component.ts adicionar o seguinte código abaixo.
|
|
51
|
-
(Serve principalmente para adicionar propriedades e métodos customizados ou não para a biblioteca).
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
import { AuthStorageService, EnvironmentService, ICustomLoginService, ICustomMenuService, ICustomStorageService, IEnvironments, IMenuConfig, LibCustomLoginService, LibCustomMenuService, LibCustomStorageService, MenuConfigService } from 'ngx-sp-auth';
|
|
55
|
-
import { CustomMenuService } from './project/custom/menu/custom-menu.service';
|
|
56
|
-
import { CustomLoginService } from './project/custom/login/custom-login.service';
|
|
57
|
-
import { CustomStorageService } from './project/custom/storage/custom-storage.service';
|
|
58
|
-
|
|
59
|
-
export class AppComponent {
|
|
60
|
-
|
|
61
|
-
private _menuConfig = new MenuConfig(false);
|
|
62
|
-
|
|
63
|
-
public configCustomLogin: ICustomLoginService = {
|
|
64
|
-
// passando propriedades customizadas para o componente de Login
|
|
65
|
-
loginTitle: "",
|
|
66
|
-
loginSubtitle: "",
|
|
67
|
-
loginBackground: "",
|
|
68
|
-
loginLogotipo: "",
|
|
69
|
-
loginAltLogotipo: "",
|
|
70
|
-
loginPageTitle: "",
|
|
71
|
-
loginDesenvDomain: "",
|
|
72
|
-
loginDesenvUser: "",
|
|
73
|
-
loginDesenvPassword: "",
|
|
74
|
-
// passando métodos customizados para o componente de Login
|
|
75
|
-
authLogin: (): void => { },
|
|
76
|
-
authLogout: (): void => { }
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
public mapsEnvironment: IEnvironments = {
|
|
80
|
-
needsAuthAplic: environment.needsAuthAplic,
|
|
81
|
-
needsAuthInfra: environment.needsAuthInfra
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
public configMenuProduto: IMenuConfig = {
|
|
85
|
-
isMenuStatic: this._menuConfig._isMenuStatic,
|
|
86
|
-
initializeMenu: this._menuConfig.initializeMenu,
|
|
87
|
-
menuOptions: this._menuConfig.menuOptions,
|
|
88
|
-
initializeMenuDropdown: this._menuConfig.initializeMenuDropdown
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
public configCustomMenuService: ICustomMenuService = {
|
|
92
|
-
menuDynamic: false,
|
|
93
|
-
moduleName: '',
|
|
94
|
-
moduleImg: '',
|
|
95
|
-
moduleSvg: "",
|
|
96
|
-
themeColor: "",
|
|
97
|
-
menuDynamicOnInit: (): void => { },
|
|
98
|
-
menuStaticOnInit: (): void => { },
|
|
99
|
-
menuopenExpansibleMenu: (ref: HTMLDivElement): void => { },
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
public configCustomStorageService: ICustomStorageService = {
|
|
103
|
-
isSaving: false,
|
|
104
|
-
storageConstructor: (): void => { },
|
|
105
|
-
storageLogout: (): void => { },
|
|
106
|
-
storageSaveLocalInstance: (): void => { },
|
|
107
|
-
storageInitializeAutoStorage: (): void => { }
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
constructor(
|
|
111
|
-
private _environmentService: EnvironmentService,
|
|
112
|
-
private _menuConfigService: MenuConfigService,
|
|
113
|
-
private _customMenuService: CustomMenuService,
|
|
114
|
-
private _customLoginService: CustomLoginService,
|
|
115
|
-
private _customStorageService: CustomStorageService,
|
|
116
|
-
private _libCusomLoginService: LibCustomLoginService,
|
|
117
|
-
private _libCustomMenuService: LibCustomMenuService,
|
|
118
|
-
private _libCustomStorageService: LibCustomStorageService,
|
|
119
|
-
) {
|
|
120
|
-
|
|
121
|
-
this.configCustomMenuService.menuDynamic = this._customMenuService.menuDynamic;
|
|
122
|
-
this.configCustomMenuService.moduleName = this._customMenuService.moduleName;
|
|
123
|
-
this.configCustomMenuService.moduleImg = this._customMenuService.moduleImg;
|
|
124
|
-
this.configCustomMenuService.moduleSvg = this._customMenuService.moduleSvg;
|
|
125
|
-
this.configCustomMenuService.themeColor = this._customMenuService.themeColor;
|
|
126
|
-
|
|
127
|
-
this.configCustomStorageService.storageConstructor = this._customStorageService.storageConstructor;
|
|
128
|
-
this.configCustomStorageService.storageInitializeAutoStorage = this._customStorageService.storageInitializeAutoStorage;
|
|
129
|
-
this.configCustomStorageService.storageLogout = this._customStorageService.storageLogout;
|
|
130
|
-
this.configCustomStorageService.storageSaveLocalInstance = this._customStorageService.storageSaveLocalInstance;
|
|
131
|
-
|
|
132
|
-
this.configCustomLogin.loginAltLogotipo = this._customLoginService.loginAltLogotipo;
|
|
133
|
-
this.configCustomLogin.loginTitle = this._customLoginService.loginTitle;
|
|
134
|
-
this.configCustomLogin.loginSubtitle = this._customLoginService.loginSubtitle;
|
|
135
|
-
this.configCustomLogin.loginPageTitle = this._customLoginService.loginPageTitle;
|
|
136
|
-
this.configCustomLogin.loginLogotipo = this._customLoginService.loginLogotipo;
|
|
137
|
-
this.configCustomLogin.loginDesenvUser = this._customLoginService.loginDesenvUser;
|
|
138
|
-
this.configCustomLogin.loginDesenvDomain = this._customLoginService.loginDesenvDomain;
|
|
139
|
-
this.configCustomLogin.loginDesenvPassword = this._customLoginService.loginDesenvPassword;
|
|
140
|
-
this.configCustomLogin.loginBackground = this._customLoginService.loginBackground;
|
|
141
|
-
this.configCustomLogin.authLogin = this._customLoginService.authLogin;
|
|
142
|
-
this.configCustomLogin.authLogout = this._customLoginService.authLogout;
|
|
143
|
-
|
|
144
|
-
this.configCustomMenuService.menuDynamicOnInit = this._customMenuService.menuDynamicOnInit;
|
|
145
|
-
this.configCustomMenuService.menuStaticOnInit = this._customMenuService.menuStaticOnInit;
|
|
146
|
-
this.configCustomMenuService.menuopenExpansibleMenu = this._customMenuService.menuopenExpansibleMenu;
|
|
147
|
-
|
|
148
|
-
_libCustomStorageService.ConfigurarCustomStorage(this.configCustomStorageService);
|
|
149
|
-
_libCusomLoginService.ConfigurarCustomLogin(this.configCustomLogin);
|
|
150
|
-
_environmentService.ConfigurarEnvironments(this.mapsEnvironment);
|
|
151
|
-
_menuConfigService.ConfigurarMenuConfig(this.configMenuProduto);
|
|
152
|
-
_libCustomMenuService.ConfigurarCustomMenuService(this.configCustomMenuService);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
- Remover o AUTH_ROUTES do main.ts
|
|
158
|
-
|
|
159
|
-
Antes:
|
|
160
|
-
```typescript
|
|
161
|
-
provideRouter([
|
|
162
|
-
...APP_ROUTES,
|
|
163
|
-
...PROJECT_ROUTES,
|
|
164
|
-
...AUTH_ROUTES
|
|
165
|
-
]),
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
Depois:
|
|
169
|
-
|
|
170
|
-
```typescript
|
|
171
|
-
provideRouter([
|
|
172
|
-
...APP_ROUTES,
|
|
173
|
-
...PROJECT_ROUTES,
|
|
174
|
-
]),
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
- Verificar o hostname do environments.ts, mudar tudo para minúsculo se tiver algo escrito em maiúsculo.
|
|
178
|
-
|
|
179
|
-
# Customização de Estilos (SCSS) 🎨
|
|
180
|
-
|
|
181
|
-
Para realizar as customizações de SCSS na biblioteca é necessario implementar o código nos seguintes arquivos do seu projeto.
|
|
182
|
-
|
|
183
|
-
- custom-login-styles.scss
|
|
184
|
-
- custom-menu-styles.scss
|
|
185
|
-
- custom-styles.scss
|
|
186
|
-
|
|
187
|
-
Classes possiveis de estilização no componente de Login:
|
|
188
|
-
|
|
189
|
-
```typescript
|
|
190
|
-
//Ainda sendo validado.
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
# Publicar no NPM 🚀
|
|
194
|
-
|
|
195
|
-
1️⃣ Mudar a propriedade "version" do no package.json para o número da nova versão que se deseja publicar no NPM.
|
|
196
|
-
|
|
197
|
-
nova versão PATCH (0.0.1);
|
|
198
|
-
|
|
199
|
-
nova versão MINOR (0.1.0);
|
|
200
|
-
|
|
201
|
-
nova versão MAJOR (1.0.0) *Somente para grandes mudanças biblioteca*.
|
|
202
|
-
|
|
203
|
-
2️⃣ Comandos para publicação:
|
|
204
|
-
|
|
205
|
-
- `cd dist/ngx-sp-auth`
|
|
206
|
-
- `npm adduser` OU `npm login` _- depende se você já possui conta no NPM ou não_
|
|
1
|
+
# NgxSpAuth - Biblioteca de Login 🔐
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
# Introdução 📝
|
|
8
|
+
|
|
9
|
+
Esta biblioteca fornece componentes de telas relacionadas a autenticação.
|
|
10
|
+
|
|
11
|
+
# Recursos 🚀
|
|
12
|
+
|
|
13
|
+
✅ Autenticação de usuários com tenant, usuario e senha;
|
|
14
|
+
|
|
15
|
+
✅ Recuperação de senha;
|
|
16
|
+
|
|
17
|
+
✅ Menu Lateral liberado após Login.
|
|
18
|
+
|
|
19
|
+
# Instalação e configuração 📥
|
|
20
|
+
|
|
21
|
+
1️⃣ Instalar a biblioteca - utilizando o comando "npm install ngx-sp-auth";
|
|
22
|
+
|
|
23
|
+
2️⃣ Configurar o sistema para utilizar os componentes (somente para projetos que nunca utilizaram essa biblioteca);
|
|
24
|
+
|
|
25
|
+
2.1. Substituir referência do import { AuthStorageService } from 'src/app/auth/storage/auth-storage.service'
|
|
26
|
+
para import { AuthStorageService } from 'ngx-sp-auth';
|
|
27
|
+
|
|
28
|
+
2.2. Verificar se existe mais alguma referência para algum arquivo dentro do diretório "src/app/auth/" e substitua a importação para "ngx-sp-auth",
|
|
29
|
+
isso depende de cada projeto.
|
|
30
|
+
|
|
31
|
+
2.3. Adicionar/Alterar os seguintes trechos de código do projeto.
|
|
32
|
+
|
|
33
|
+
- import { AuthGuard, LoginComponent, NovaSenhaComponent } from "ngx-sp-auth";
|
|
34
|
+
|
|
35
|
+
- No seu APP_ROUTES colocar as rotas abaixo.
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
{
|
|
39
|
+
path: "auth/login",
|
|
40
|
+
component: LoginComponent,
|
|
41
|
+
canLoad: [LoginGuard]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
path: 'auth/login/novaSenha/:param',
|
|
45
|
+
component: NovaSenhaComponent,
|
|
46
|
+
canLoad: [LoginGuard]
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- No seu app-component.ts adicionar o seguinte código abaixo.
|
|
51
|
+
(Serve principalmente para adicionar propriedades e métodos customizados ou não para a biblioteca).
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { AuthStorageService, EnvironmentService, ICustomLoginService, ICustomMenuService, ICustomStorageService, IEnvironments, IMenuConfig, LibCustomLoginService, LibCustomMenuService, LibCustomStorageService, MenuConfigService } from 'ngx-sp-auth';
|
|
55
|
+
import { CustomMenuService } from './project/custom/menu/custom-menu.service';
|
|
56
|
+
import { CustomLoginService } from './project/custom/login/custom-login.service';
|
|
57
|
+
import { CustomStorageService } from './project/custom/storage/custom-storage.service';
|
|
58
|
+
|
|
59
|
+
export class AppComponent {
|
|
60
|
+
|
|
61
|
+
private _menuConfig = new MenuConfig(false);
|
|
62
|
+
|
|
63
|
+
public configCustomLogin: ICustomLoginService = {
|
|
64
|
+
// passando propriedades customizadas para o componente de Login
|
|
65
|
+
loginTitle: "",
|
|
66
|
+
loginSubtitle: "",
|
|
67
|
+
loginBackground: "",
|
|
68
|
+
loginLogotipo: "",
|
|
69
|
+
loginAltLogotipo: "",
|
|
70
|
+
loginPageTitle: "",
|
|
71
|
+
loginDesenvDomain: "",
|
|
72
|
+
loginDesenvUser: "",
|
|
73
|
+
loginDesenvPassword: "",
|
|
74
|
+
// passando métodos customizados para o componente de Login
|
|
75
|
+
authLogin: (): void => { },
|
|
76
|
+
authLogout: (): void => { }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public mapsEnvironment: IEnvironments = {
|
|
80
|
+
needsAuthAplic: environment.needsAuthAplic,
|
|
81
|
+
needsAuthInfra: environment.needsAuthInfra
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
public configMenuProduto: IMenuConfig = {
|
|
85
|
+
isMenuStatic: this._menuConfig._isMenuStatic,
|
|
86
|
+
initializeMenu: this._menuConfig.initializeMenu,
|
|
87
|
+
menuOptions: this._menuConfig.menuOptions,
|
|
88
|
+
initializeMenuDropdown: this._menuConfig.initializeMenuDropdown
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public configCustomMenuService: ICustomMenuService = {
|
|
92
|
+
menuDynamic: false,
|
|
93
|
+
moduleName: '',
|
|
94
|
+
moduleImg: '',
|
|
95
|
+
moduleSvg: "",
|
|
96
|
+
themeColor: "",
|
|
97
|
+
menuDynamicOnInit: (): void => { },
|
|
98
|
+
menuStaticOnInit: (): void => { },
|
|
99
|
+
menuopenExpansibleMenu: (ref: HTMLDivElement): void => { },
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
public configCustomStorageService: ICustomStorageService = {
|
|
103
|
+
isSaving: false,
|
|
104
|
+
storageConstructor: (): void => { },
|
|
105
|
+
storageLogout: (): void => { },
|
|
106
|
+
storageSaveLocalInstance: (): void => { },
|
|
107
|
+
storageInitializeAutoStorage: (): void => { }
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
constructor(
|
|
111
|
+
private _environmentService: EnvironmentService,
|
|
112
|
+
private _menuConfigService: MenuConfigService,
|
|
113
|
+
private _customMenuService: CustomMenuService,
|
|
114
|
+
private _customLoginService: CustomLoginService,
|
|
115
|
+
private _customStorageService: CustomStorageService,
|
|
116
|
+
private _libCusomLoginService: LibCustomLoginService,
|
|
117
|
+
private _libCustomMenuService: LibCustomMenuService,
|
|
118
|
+
private _libCustomStorageService: LibCustomStorageService,
|
|
119
|
+
) {
|
|
120
|
+
|
|
121
|
+
this.configCustomMenuService.menuDynamic = this._customMenuService.menuDynamic;
|
|
122
|
+
this.configCustomMenuService.moduleName = this._customMenuService.moduleName;
|
|
123
|
+
this.configCustomMenuService.moduleImg = this._customMenuService.moduleImg;
|
|
124
|
+
this.configCustomMenuService.moduleSvg = this._customMenuService.moduleSvg;
|
|
125
|
+
this.configCustomMenuService.themeColor = this._customMenuService.themeColor;
|
|
126
|
+
|
|
127
|
+
this.configCustomStorageService.storageConstructor = this._customStorageService.storageConstructor;
|
|
128
|
+
this.configCustomStorageService.storageInitializeAutoStorage = this._customStorageService.storageInitializeAutoStorage;
|
|
129
|
+
this.configCustomStorageService.storageLogout = this._customStorageService.storageLogout;
|
|
130
|
+
this.configCustomStorageService.storageSaveLocalInstance = this._customStorageService.storageSaveLocalInstance;
|
|
131
|
+
|
|
132
|
+
this.configCustomLogin.loginAltLogotipo = this._customLoginService.loginAltLogotipo;
|
|
133
|
+
this.configCustomLogin.loginTitle = this._customLoginService.loginTitle;
|
|
134
|
+
this.configCustomLogin.loginSubtitle = this._customLoginService.loginSubtitle;
|
|
135
|
+
this.configCustomLogin.loginPageTitle = this._customLoginService.loginPageTitle;
|
|
136
|
+
this.configCustomLogin.loginLogotipo = this._customLoginService.loginLogotipo;
|
|
137
|
+
this.configCustomLogin.loginDesenvUser = this._customLoginService.loginDesenvUser;
|
|
138
|
+
this.configCustomLogin.loginDesenvDomain = this._customLoginService.loginDesenvDomain;
|
|
139
|
+
this.configCustomLogin.loginDesenvPassword = this._customLoginService.loginDesenvPassword;
|
|
140
|
+
this.configCustomLogin.loginBackground = this._customLoginService.loginBackground;
|
|
141
|
+
this.configCustomLogin.authLogin = this._customLoginService.authLogin;
|
|
142
|
+
this.configCustomLogin.authLogout = this._customLoginService.authLogout;
|
|
143
|
+
|
|
144
|
+
this.configCustomMenuService.menuDynamicOnInit = this._customMenuService.menuDynamicOnInit;
|
|
145
|
+
this.configCustomMenuService.menuStaticOnInit = this._customMenuService.menuStaticOnInit;
|
|
146
|
+
this.configCustomMenuService.menuopenExpansibleMenu = this._customMenuService.menuopenExpansibleMenu;
|
|
147
|
+
|
|
148
|
+
_libCustomStorageService.ConfigurarCustomStorage(this.configCustomStorageService);
|
|
149
|
+
_libCusomLoginService.ConfigurarCustomLogin(this.configCustomLogin);
|
|
150
|
+
_environmentService.ConfigurarEnvironments(this.mapsEnvironment);
|
|
151
|
+
_menuConfigService.ConfigurarMenuConfig(this.configMenuProduto);
|
|
152
|
+
_libCustomMenuService.ConfigurarCustomMenuService(this.configCustomMenuService);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
- Remover o AUTH_ROUTES do main.ts
|
|
158
|
+
|
|
159
|
+
Antes:
|
|
160
|
+
```typescript
|
|
161
|
+
provideRouter([
|
|
162
|
+
...APP_ROUTES,
|
|
163
|
+
...PROJECT_ROUTES,
|
|
164
|
+
...AUTH_ROUTES
|
|
165
|
+
]),
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
Depois:
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
provideRouter([
|
|
172
|
+
...APP_ROUTES,
|
|
173
|
+
...PROJECT_ROUTES,
|
|
174
|
+
]),
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
- Verificar o hostname do environments.ts, mudar tudo para minúsculo se tiver algo escrito em maiúsculo.
|
|
178
|
+
|
|
179
|
+
# Customização de Estilos (SCSS) 🎨
|
|
180
|
+
|
|
181
|
+
Para realizar as customizações de SCSS na biblioteca é necessario implementar o código nos seguintes arquivos do seu projeto.
|
|
182
|
+
|
|
183
|
+
- custom-login-styles.scss
|
|
184
|
+
- custom-menu-styles.scss
|
|
185
|
+
- custom-styles.scss
|
|
186
|
+
|
|
187
|
+
Classes possiveis de estilização no componente de Login:
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
//Ainda sendo validado.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
# Publicar no NPM 🚀
|
|
194
|
+
|
|
195
|
+
1️⃣ Mudar a propriedade "version" do no package.json para o número da nova versão que se deseja publicar no NPM.
|
|
196
|
+
|
|
197
|
+
nova versão PATCH (0.0.1);
|
|
198
|
+
|
|
199
|
+
nova versão MINOR (0.1.0);
|
|
200
|
+
|
|
201
|
+
nova versão MAJOR (1.0.0) *Somente para grandes mudanças biblioteca*.
|
|
202
|
+
|
|
203
|
+
2️⃣ Comandos para publicação:
|
|
204
|
+
|
|
205
|
+
- `cd dist/ngx-sp-auth`
|
|
206
|
+
- `npm adduser` OU `npm login` _- depende se você já possui conta no NPM ou não_
|
|
207
207
|
- `npm publish --access public --tag latest`
|