Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use edgee-component toml to build #5

Merged
merged 7 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions Makefile

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pre-instantiating (which requires a lot of computing), which can be mitigated us

## Setup
Requirements:
- [edgee-cli] (https://github.com/edgee-cloud/edgee)
- Node.js / npm

```shell
Expand All @@ -34,5 +35,5 @@ $ npm install
## Building

```shell
$ npm run build
$ edgee components build
```
15 changes: 15 additions & 0 deletions edgee-component.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
manifest_version = 1

[package]
name = "example-js-component"
version = "1.0.0"
category = "data-collection"
subcategory = "analytics"
description = "Example Javascript component for data collection"
documentation = "https://github.com/edgee-cloud/example-js-component"
repository = "https://github.com/edgee-cloud/example-js-component"
wit-world-version = "0.4.0"

[package.build]
command = "npm install && npm run generate && npm run build"
output_path = "./example-js-component.wasm"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"main": "src/index.js",
"types": "./types/wit.d.ts",
"scripts": {
"generate": "npx @bytecodealliance/jco types wit/ -o types/",
"build": "npx @bytecodealliance/jco componentize src/index.js --wit wit -o example-js-component.wasm -n data-collection -d all",
"test": "mocha",
"coverage": "c8 --src js --all -r text -r text-summary npm test"
Expand Down