From d65396e8672be8c1c504f32bbb0db71d9ae0c3d1 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Mon, 31 Jul 2023 11:28:22 -0700 Subject: [PATCH] (docs): add simple example for shebang support across some common languages --- examples/shebang.md | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 examples/shebang.md diff --git a/examples/shebang.md b/examples/shebang.md new file mode 100644 index 000000000..c1a0273f1 --- /dev/null +++ b/examples/shebang.md @@ -0,0 +1,46 @@ +# Runme Language Support + +By default Runme can run everything that is also installed on your machine. + +## Like Python: + +```py +print("Hello Pythonista 🐍") +``` + +## maybe Ruby? + +```rb +puts "Hello Ruby ♦️" +``` + +## or JavaScript: + +```js +console.log("Always bet on JS!") +``` + +## even TypeScript: + +Make sure you have `ts-node` installed globally: + +```sh +npm i -g ts-node +``` + +then run: + +```ts +const myVar: string = 'I am a typed string!' +console.log(myVar) +``` + +## Java + +```java +class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World!"); + } +} +```