make-installer.js 690 B

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