0.3.0 • Published 5 months ago

sunbeam-sdk v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Sunbeam Deno SDK

Type Validation for Sunbeam Scripts

import * as sunbeam from "https://deno.land/x/sunbeam/mod.ts";

if (Deno.args.length === 0) {
    const manifest: sunbeam.Manifest = {...}
    console.log(manifest);
    Deno.exit(0);
}

const payload: sunbeam.Payload = JSON.parse(Deno.args[0]);

if (payload.command = "show") {
    const list: sunbeam.List = {...}
    console.log(JSON.stringify(list));
}

Helper Functions

import { editor } from "https://deno.land/x/sunbeam/editor.ts";

// ...

if (payload.command === "edit") {
    // open an editor and wait for the user to save and exit
    const edited = await editor(payload.text);
}
0.3.0

5 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.0.2

6 months ago

0.2.2

6 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago