core.js 373 B

123456789101112131415
  1. import { SET_SERVICE } from './request';
  2. import { SET_CRUD } from './crud';
  3. import { SET_ROUTER } from './router';
  4. import './index';
  5. export async function bootstrap(options) {
  6. const { store, router, ['view-routes']: routes, ['x-crud']: crud } = options;
  7. await SET_SERVICE({ store });
  8. SET_CRUD({ crud });
  9. SET_ROUTER({ router, routes });
  10. return { router, store };
  11. }