@adimm/x-injection 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/README.md +5 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -117,13 +117,14 @@ Now, `LoggerService` and `ConfigService` can be injected anywhere in your app, i
117
117
  You can also import entire modules into the `AppModule` like so:
118
118
 
119
119
  ```ts
120
+ const SECRET_TOKEN_PROVIDER = { provide: 'SECRET_TOKEN', useValue: '123' };
121
+ const SECRET_TOKEN_2_PROVIDER = { provide: 'SECRET_TOKEN_2', useValue: 123 };
122
+
120
123
  const ConfigModule = new ProviderModule({
121
124
  identifier: Symbol('ConfigModule'),
122
125
  markAsGlobal: true,
123
- providers: [
124
- { provide: 'SECRET_TOKEN', useValue: '123' },
125
- { provide: 'SECRET_TOKEN_2', useValue: 123 },
126
- ],
126
+ providers: [SECRET_TOKEN_PROVIDER, SECRET_TOKEN_2_PROVIDER],
127
+ exports: [SECRET_TOKEN_PROVIDER, SECRET_TOKEN_2_PROVIDER],
127
128
  });
128
129
 
129
130
  AppModule.register({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adimm/x-injection",
3
3
  "description": "Powerful IoC library built on-top of InversifyJS inspired by NestJS's DI.",
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "author": "Adi-Marian Mutu",
6
6
  "homepage": "https://github.com/AdiMarianMutu/x-injection#readme",
7
7
  "bugs": "https://github.com/AdiMarianMutu/x-injection/issues",