Skip to content

Commit

Permalink
Upgrade runme format
Browse files Browse the repository at this point in the history
  • Loading branch information
sourishkrout committed Feb 9, 2024
1 parent 8743bbb commit c9c1d1a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cwd: ./
runme:
id: 01HF7GMQ6PE0NNKN60P50JEZ17
version: v2.0
version: v2.2
---

# Contributing
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
runme:
id: 01HP7J575TFZ65WYPQPZGE7STA
version: v2.2
---

# Runme.js [![Test Changes](https://github.com/stateful/runmejs/actions/workflows/test.yaml/badge.svg)](https://github.com/stateful/runmejs/actions/workflows/test.yaml) [![npm version](https://badge.fury.io/js/runme.svg)](https://badge.fury.io/js/runme) [![Join us on Discord](https://img.shields.io/discord/878764303052865537?color=5b39df&label=Join%20us%20on%20Discord)](https://discord.com/invite/BQm8zRCBUY)

> A JavaScript module to use [Runme](https://runme.dev) in Node.js.
Expand Down Expand Up @@ -38,7 +44,7 @@ The module exposes the following methods:

Run code cells from markdown files:

```ts { name="runExample" }
```ts {"name":"runExample"}
import { run } from 'runme'

const result = await run('helloWorld')
Expand Down
14 changes: 10 additions & 4 deletions examples/example.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---
runme:
id: 01HP7J575TFZ65WYPQQ9E9E0G9
version: v2.2
---

# Example Markdown

```sh { name=helloWorld }
```sh {"name":"helloWorld"}
echo "Hello World"
```

```sh { name=fail }
```sh {"name":"fail"}
exit 1
```

```sh { name=export promptEnv=false }
```sh {"name":"export","promptEnv":"false"}
export FOO="bar"
```

```sh { name=print }
```sh {"name":"print"}
echo "exported FOO=$FOO"
```

0 comments on commit c9c1d1a

Please sign in to comment.