How to use @aurelia/aot - 3 common examples

To help you get started, we’ve selected a few @aurelia/aot 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 aurelia / aurelia / packages / __tests__ / aot / smoke-tests.spec.ts View on Github external
async function execute(content: string) {
    const container = DI.createContainer();
    container.register(
      LoggerConfiguration.create(console, LogLevel.debug, ColorOptions.colors),
      Registration.singleton(IFileSystem, VirtualFileSystem),
    );

    const host = new ServiceHost(container);

    const result = await host.executeSpecificFile({
      shortName: '',
      shortPath: '',
      kind: FileKind.Script,
      path: '',
      dir: '',
      rootlessPath: '',
      name: '',
      ext: '',
      // eslint-disable-next-line @typescript-eslint/require-await
      async getContent() {
        return content;
      },
      getContentSync() {
        return content;
github aurelia / aurelia / packages / __tests__ / aot / smoke-tests.spec.ts View on Github external
async function execute(content: string) {
    const container = DI.createContainer();
    container.register(
      LoggerConfiguration.create(console, LogLevel.debug, ColorOptions.colors),
      Registration.singleton(IFileSystem, VirtualFileSystem),
    );

    const host = new ServiceHost(container);

    const result = await host.executeSpecificFile({
      shortName: '',
      shortPath: '',
      kind: FileKind.Script,
      path: '',
      dir: '',
      rootlessPath: '',
      name: '',
      ext: '',
      // eslint-disable-next-line @typescript-eslint/require-await
      async getContent() {
        return content;
      },
      getContentSync() {
        return content;
      },
    }, 'module');

    if (result.isAbrupt) {
      assert.fail(`Evaluation error`);
github aurelia / aurelia / packages / __tests__ / setup-test262.ts View on Github external
public get host(): IServiceHost {
    let host = this._host;
    if (host === null) {
      host = this._host = new ServiceHost(this.container);
    }
    return host;
  }

@aurelia/aot

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/) [![CircleCI](https://circleci.com/

MIT
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis