Skip to content

Instantly share code, notes, and snippets.

@Aleksandyr
Created April 2, 2019 13:42
Show Gist options
  • Select an option

  • Save Aleksandyr/ae9df15cd646f65a55a714d65caec54e to your computer and use it in GitHub Desktop.

Select an option

Save Aleksandyr/ae9df15cd646f65a55a714d65caec54e to your computer and use it in GitHub Desktop.

Revisions

  1. Aleksandyr revised this gist Apr 2, 2019. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions index.ts
    Original file line number Diff line number Diff line change
    @@ -7,15 +7,14 @@ module.exports = (PluginHost: Application) => {
    */
    app.options.addComponent('options-component', OptComponent);

    /**
    * Register component responsible for the convertion.
    */
    app.converter.addComponent('convert-component', ConvertComponent);
    /**
    * Register component responsible for the convertion.
    */
    app.converter.addComponent('convert-component', ConvertComponent);

    /**
    * Register component responsible for the Renderer.
    */
    app.renderer.addComponent('render-component', RenderComponenet);
    }
    /**
    * Register component responsible for the Renderer.
    */
    app.renderer.addComponent('render-component', RenderComponenet);
    ...
    }
  2. Aleksandyr created this gist Apr 2, 2019.
    21 changes: 21 additions & 0 deletions index.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@

    module.exports = (PluginHost: Application) => {
    const app = PluginHost.owner;

    /**
    * Add Options register Component.
    */
    app.options.addComponent('options-component', OptComponent);

    /**
    * Register component responsible for the convertion.
    */
    app.converter.addComponent('convert-component', ConvertComponent);

    /**
    * Register component responsible for the Renderer.
    */
    app.renderer.addComponent('render-component', RenderComponenet);
    }
    ...
    }