@spine/pluggable
v0.0.8
Published
A pluggable module for spine
Downloads
9
Maintainers
Readme
Spine Pluggable Utility
A pluggable utility valid for both client and server
How to use it
Make sure to import @spine/pluggable
before bootstraping.
# index.ts
import config from './config';
import { bootstrap } from '@spine/bootstrap';
bootstrap()
.catch(error => console.error(error.stack));
# config/index.ts
import {
PluggableConfig,
} from '@spine/pluggable';
import {
ConfigSource as BaseConfigSource,
extendConfig,
} from '@spine/config';
export interface ConfigSource extends extends BaseConfigSource, PluggableConfig {}
export const {
config,
loadConfig,
} = extendConfig<ConfigSource>('MyConfig');
loadConfig({
plugins: {
'my-plugin-module': {
enabled: true,
},
},
});
export default config;