Typescript component bundled with esbuild
This repository contains a custom wasm component, written in Typescript.
This component:
- Uses Typescript for it's implementation
 - Bundles with esbuild
 
Dependencies
![WARN] When building this project, ensure you are using a stable NodeJS release.
Use of node version management tools (ex.
nvmor more newer NVM compatible tools likefnm) are recommended -- a.nvmrcfile is included for easy use.
Building this project relies on the following software:
| Name | Description | 
|---|---|
wash | Wasmcloud Shell controls your [wasmcloud][wasmcloud] host instances and enables building components | 
npm | Node Package Manager (NPM) which manages packages for for the NodeJS ecosystem | 
node | [NodeJS runtime][nodejs] (see .nvmrc for version) | 
Quickstart
To get started developing this repository quickly, clone the repo and run npm start:
npm startThis results that the output of the demo.js script is printed to the console.
Details
See package.json for the exact commands being run.
The main entry point is the start script (i.e. npm start) which performs the following steps:
npm installto download all dependencies- building the component
 - transpiling the component so it can be called from javascript
 - running the demo.js script
 
Bundling
It uses esbuild to bundling the javascript together with the dependencies. Some libaries are not compatible with esbuild, see the other examples for other bundlers that support plugins.