make-installer.js 773 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. require('./components/config-provider/index.js');
  4. require('./constants/index.js');
  5. var version = require('./version.js');
  6. var key = require('./constants/key.js');
  7. var useGlobalConfig = require('./components/config-provider/src/hooks/use-global-config.js');
  8. const makeInstaller = (components = []) => {
  9. const install = (app, options) => {
  10. if (app[key.INSTALLED_KEY])
  11. return;
  12. app[key.INSTALLED_KEY] = true;
  13. components.forEach((c) => app.use(c));
  14. if (options)
  15. useGlobalConfig.provideGlobalConfig(options, app, true);
  16. };
  17. return {
  18. version: version.version,
  19. install
  20. };
  21. };
  22. exports.makeInstaller = makeInstaller;
  23. //# sourceMappingURL=make-installer.js.map