How to use the @gapi/core.Container.set function in @gapi/core

To help you get started, we’ve selected a few @gapi/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rxdi / graphqj / src / helpers / react-to-changes.ts View on Github external
// await SchemaIntrospection()
  } catch (e) {
    console.error(e);
  }
  isRunning = false;
  if (config.$views) {
    config.$views = await transpileComponentsForViews(config.$views)
  }

  if(config.$components) {
    config.$components = (await transpileComponentsInit(config.$components as string[])).map(c => c && c.link ? c.link : c) as any;
  }

  Container.reset(Config)
  Container.remove(Config)
  Container.set(Config, config);
  if (config.$views) {
    Container.get(PubSubService).publish('listenForChanges', config.$views);
  }
  Container.reset('main-config-compiled')
  Container.remove('main-config-compiled')
  Container.set('main-config-compiled', config)
  console.log(`📦  Bundle realoaded! ${Date.now() - timer}ms`, path);
}
github rxdi / graphqj / src / app / app.module.ts View on Github external
//   traverseMap.push(...(config.$components as string[]).map(c => ({path: c.replace('💉', ''), parent: null})))
        // }
        if (config.$views) {
          process.argv.push('--hot-reload', '--client')
        }
        if (includes('--hot-reload')) {
          config.$externals.forEach(e =>
            traverseMap.push({ parent: null, path: e.file })
          );
          watchBundles(traverseMap.map(f => f.path), config);
        }
        config.$components = config.$components || [];
        if (config.$components.length) {
          config.$components = (await predictConfig(config.$components as string[]) || []).map(c => c.link)
        }
        Container.set('main-config-compiled', config)
        console.log(
          'You can extract this schema by running --generate command'
        );
        return true;
      }
    }
github rxdi / graphqj / src / helpers / react-to-changes.ts View on Github external
config.$views = await transpileComponentsForViews(config.$views)
  }

  if(config.$components) {
    config.$components = (await transpileComponentsInit(config.$components as string[])).map(c => c && c.link ? c.link : c) as any;
  }

  Container.reset(Config)
  Container.remove(Config)
  Container.set(Config, config);
  if (config.$views) {
    Container.get(PubSubService).publish('listenForChanges', config.$views);
  }
  Container.reset('main-config-compiled')
  Container.remove('main-config-compiled')
  Container.set('main-config-compiled', config)
  console.log(`📦  Bundle realoaded! ${Date.now() - timer}ms`, path);
}