0.0.7 • Published 3 years ago

astro-command v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Astro Command

Astro component for static rendering of commands. This allows you build components in any language.

Demo

Usage

---
import { Command } from "astro-command";
---
<Command caller={import.meta.url} command="Component.py" message="from python!" />

Component.py

#!/usr/bin/env python 

import sys, json

data = json.load(sys.stdin)
print(f'<h1> Hello {data["message"]} </h1>')
  • caller: url of the caller so we can use it to look up relative paths
  • command: name of the command to execute. relative path from the caller
  • props: all props are passed to command as json via stdin
  • html: generated html sent out via stdout embedded
0.0.5

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago