6.5.0 • Published 12 months ago
@k8slens/feature-core v6.5.0
@k8slens/feature-core
Feature is set of injectables that are registered and deregistered simultaneously.
Install
$ npm install @k8slens/feature-core
Usage
import { createContainer } from "@ogre-tools/injectable"
import { getFeature, registerFeature, deregisterFeature } from "@k8slens/feature-core"
// Notice that this Feature is usually exported from another NPM package.
const someFeature = getFeature({
id: "some-feature",
register: (di) => {
di.register(someInjectable, someOtherInjectable);
},
// Feature dependencies are automatically registered and
// deregistered when necessary.
dependencies: [someOtherFeature]
});
const di = createContainer("some-container");
registerFeature(di, someFeature);
// Or perhaps you want to deregister?
deregisterFeature(di, someFeature);
Need to know
NPM packages exporting a Feature
- Prefer
peerDependencies
since they are installed from the application and are not allowed to be in the built bundle. - Prefer exporting
injectionToken
instead ofinjectable
for not allowing other features to access technical details like theinjectable
6.5.0-alpha.7
12 months ago
6.5.0-alpha.6
12 months ago
6.5.0-alpha.8
12 months ago
6.5.0
12 months ago
6.5.0-alpha.5
12 months ago
6.5.0-alpha.4
1 year ago
6.5.0-alpha.3
1 year ago
6.5.0-alpha.2
1 year ago
6.5.0-alpha.1
1 year ago
6.5.0-cron.e6d6d1d
1 year ago
6.5.0-cron.48ce558
1 year ago
6.5.0-cron.094758f
1 year ago
6.5.0-cron.f88555a
1 year ago
6.5.0-cron.a917494
1 year ago
6.5.0-cron.ab11b20
1 year ago