@startinblox/component-babelfish

1.0.10 • Public • Published

Solid Babelfish

This is the repository of our component integrating the Babelfish services API, allowing a user to:

  • Browse the list of available Ontochain services
  • Access the detail of a service
  • ?? Register a new service ??

Access core within your component

Use core variable directly, eg.:

import('./utils.js').then(utils => {
  import(utils.coreVersion()).then(core => {
    customElements.define("solid-babelfish",
      class extends core.SolidTemplateElement {
        constructor() {
          core.store.put({
            'username': 'Superman',
            '@context': this.context,
          }, 'http://server/users/admin/');
        }
      }
    );
  });
});

Target a local asset

Use the utils.path() function to return the actual path of your component (local or cdn), eg.:

import('./utils.js').then(utils => {
  import(utils.coreVersion()).then(core => {
    customElements.define("solid-babelfish",
      class extends core.SolidTemplateElement {
        constructor() {
          core.Helpers.importCSS(utils.path() + '/styles/index.css?min');
        }
      }
    );
  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i @startinblox/component-babelfish

Weekly Downloads

1

Version

1.0.10

License

MIT

Unpacked Size

20.1 MB

Total Files

1037

Last publish

Collaborators

  • belenio
  • startinbloxbot
  • balessan
  • clem-sib
  • plup
  • matthieu.f
  • jbpasquier