Skip to content

Commit

Permalink
feat: use edgee-component toml to build (#5)
Browse files Browse the repository at this point in the history
* feat: use edgee-component toml to build

* feat: update wit version

* feat(): harmonize component output path

* feat(): update toml for new format

* simplify build commands

* remove Makefile, add edgee CLI build to README

---------

Co-authored-by: Alex Casalboni <alexsaxmib@gmail.com>
  • Loading branch information
NicolasGirardot and alexcasalboni authored Feb 11, 2025
1 parent 685d82a commit b0f6b82
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
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

0 comments on commit b0f6b82

Please sign in to comment.