DocsCookbookCommunityGitHub →

Installation

NPM

npm i @symbiotejs/symbiote

Alternatives

CDN

import { BaseComponent } from 'https://esm.sh/@symbiotejs/symbiote/';

TypeScript support (my-types.d.ts):

// First, let TypeScript allow all module names starting with "https://". This will suppress TS errors.
declare module 'https://*';

// Second, list out all your dependencies. For every URL, you must map it to its local module.
declare module 'https://esm.sh/@symbiotejs/symbiote/' {
  export * from '@symbiotejs/symbiote';
}

Git submodule

Initial submodule connection:

git submodule add -b main https://github.com/symbiotejs/symbiote.js.git ./symbiote

Activation at the cloned host repository and getting updates:

git submodule update --init --recursive --remote

Switch to the certain revision:

cd symbiote && git checkout <VERSION_TAG>

package.json scripts section example:

{
  "scripts": {
    "git-modules": "git submodule update --init --recursive --remote",
    "sym-version": "cd symbiote && git checkout <VERSION_TAG> && cd ..",
    "setup": "npm run git-modules && npm run sym-version && npm i"
  }
}

Then npm run setup