@eventstore-ui/editor
Monaco editor wrapped in a web component, with pre-built workers.
See Monaco Editor for more information about usage.
Log in to github packages
$ npm login --registry=https://npm.pkg.github.com
> Username: USERNAME
> Password: TOKEN
> Email: PUBLIC-EMAIL-ADDRESS
TOKEN
can be obtained from https://github.com/settings/tokens and requires repo
and read:packages
permissions
Add to your project
yarn add @eventstore-ui/editor
Also, include the peer dependencies:
yarn add @eventstore-ui/components @eventstore-ui/utils
Set up within a Stencil project:
In your stencil config, add the workers to your copy task.
import { workerPath } from '@eventstore-ui/editor/configure';
export const config: Config = {
outputTargets: [
{
copy: [
{
src: workerPath,
dest: 'workers',
},
],
},
],
};
In your globalScript
file:
import '@eventstore-ui/components';
import '@eventstore-ui/editor';
import { initialize } from '@eventstore-ui/editor/initialize';
initialize();