make-installer.mjs 578 B

123456789101112131415161718192021
  1. import { version } from './version.mjs';
  2. import { INSTALLED_KEY } from './constants/key.mjs';
  3. import { provideGlobalConfig } from './components/config-provider/src/hooks/use-global-config.mjs';
  4. const makeInstaller = (components = []) => {
  5. const install = (app, options) => {
  6. if (app[INSTALLED_KEY])
  7. return;
  8. app[INSTALLED_KEY] = true;
  9. components.forEach((c) => app.use(c));
  10. if (options)
  11. provideGlobalConfig(options, app, true);
  12. };
  13. return {
  14. version,
  15. install
  16. };
  17. };
  18. export { makeInstaller };
  19. //# sourceMappingURL=make-installer.mjs.map