Files
Victor Adossi 79f7995b6d chore(examples): add examples (#507)
* chore(examples): add examples

This commit adds examples to the jco, some of which are/will be
referenced from the component-model book (https://component-model.bytecodealliance.org/).

Signed-off-by: Victor Adossi <vadossi@cosmonic.com>

* fix(examples): nodejs script target command chaining

Co-authored-by: Guy Bedford <guybedford@gmail.com>

* refactor(examples): inline reverseAndUppercase() in component

Signed-off-by: Victor Adossi <vadossi@cosmonic.com>

* refactor(examples): inline reverseString() in example

Signed-off-by: Victor Adossi <vadossi@cosmonic.com>

---------

Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
Co-authored-by: Guy Bedford <guybedford@gmail.com>
2024-10-18 12:17:46 -07:00

17 lines
364 B
Plaintext

package example:string-reverse-upper@0.1.0;
@since(version = 0.1.0)
interface reversed-upper {
reverse-and-uppercase: func(s: string) -> string;
}
world revup {
//
// NOTE, the import below translates to:
// <namespace>:<package>/<interface>@<package version>
//
import example:string-reverse/reverse@0.1.0;
export reversed-upper;
}