Wicklets/wick-editor

Publish runtime to NPM

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Integrate Wick Editor runtime with NPM projects which are bundled for the browser using tools like Webpack, Rollup, Parcel etc.. The goal of using the runtime is for loading multiple .wick files from a HTML project, without using timeline code.

It'd be interesting for it to work both at Web Browser and Node.js (for back-end streamed projects). For this I recommend using the "browser" property in NPM package.json (which is handled by the bundlers like Webpack, Parcel etc.):

{
  ...
  "browser": {
    "./src/code4nodejs.js": "./src/code4browser.js"
  }
  ...
}

Or provide a package for each (in case a HTML reference or Node.JS API reference exists into the runtime):

  • com.wicklets.browser-runtime
  • com.wicklets.nodejs-runtime

(They could share the same .wick parser.)

Additionally, TypeScript typings:

{
  ...
  "types": "./src/typings.d.ts",
  "typings": "./src/typings.d.ts"
  ...
}

Describe alternatives you've considered
Currently it is possible to get the Wick Editor JavaScript runtime by exporting a dummy project from the editor to a compressed archive and then retrieving the runtime JS, but this should be much easier.

Additional context
Nothing