aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/cat.ts5
-rw-r--r--examples/hashing.js (renamed from examples/bun/hashing.js)0
-rw-r--r--examples/html-rewriter.ts (renamed from examples/bun/html-rewriter.ts)0
-rw-r--r--examples/http-file.ts (renamed from examples/bun/http-file.ts)0
-rw-r--r--examples/http.ts (renamed from examples/bun/http.ts)0
-rw-r--r--examples/mmap/1.js (renamed from examples/bun/mmap/1.js)0
-rw-r--r--examples/mmap/2.js (renamed from examples/bun/mmap/2.js)0
-rw-r--r--examples/mmap/mmap.txt (renamed from examples/bun/mmap/mmap.txt)0
-rw-r--r--examples/openInEditor.js (renamed from examples/bun/openInEditor.js)0
-rw-r--r--examples/ssl.ts (renamed from examples/bun/ssl.ts)0
-rw-r--r--examples/tsconfig.json (renamed from examples/bun/tsconfig.json)3
11 files changed, 6 insertions, 2 deletions
diff --git a/examples/cat.ts b/examples/cat.ts
new file mode 100644
index 000000000..1bb1c809a
--- /dev/null
+++ b/examples/cat.ts
@@ -0,0 +1,5 @@
+import { resolve } from "path";
+const { write, stdout, file } = Bun;
+const input = resolve(process.argv[process.argv.length - 1]);
+
+await write(stdout, file(input));
diff --git a/examples/bun/hashing.js b/examples/hashing.js
index cf4772ffe..cf4772ffe 100644
--- a/examples/bun/hashing.js
+++ b/examples/hashing.js
diff --git a/examples/bun/html-rewriter.ts b/examples/html-rewriter.ts
index 2b370c5ed..2b370c5ed 100644
--- a/examples/bun/html-rewriter.ts
+++ b/examples/html-rewriter.ts
diff --git a/examples/bun/http-file.ts b/examples/http-file.ts
index f2c0773e8..f2c0773e8 100644
--- a/examples/bun/http-file.ts
+++ b/examples/http-file.ts
diff --git a/examples/bun/http.ts b/examples/http.ts
index 4d58f270f..4d58f270f 100644
--- a/examples/bun/http.ts
+++ b/examples/http.ts
diff --git a/examples/bun/mmap/1.js b/examples/mmap/1.js
index 1c4f2c969..1c4f2c969 100644
--- a/examples/bun/mmap/1.js
+++ b/examples/mmap/1.js
diff --git a/examples/bun/mmap/2.js b/examples/mmap/2.js
index c4b68bd9a..c4b68bd9a 100644
--- a/examples/bun/mmap/2.js
+++ b/examples/mmap/2.js
diff --git a/examples/bun/mmap/mmap.txt b/examples/mmap/mmap.txt
index 6931040dd..6931040dd 100644
--- a/examples/bun/mmap/mmap.txt
+++ b/examples/mmap/mmap.txt
diff --git a/examples/bun/openInEditor.js b/examples/openInEditor.js
index 59282c098..59282c098 100644
--- a/examples/bun/openInEditor.js
+++ b/examples/openInEditor.js
diff --git a/examples/bun/ssl.ts b/examples/ssl.ts
index df30a0bd6..df30a0bd6 100644
--- a/examples/bun/ssl.ts
+++ b/examples/ssl.ts
diff --git a/examples/bun/tsconfig.json b/examples/tsconfig.json
index ab7f30fc9..4e99331ee 100644
--- a/examples/bun/tsconfig.json
+++ b/examples/tsconfig.json
@@ -3,7 +3,6 @@
"lib": ["ESNext"],
"module": "esnext",
"target": "esnext",
- "typeRoots": ["../../types"],
- "types": ["bun"]
+ "typeRoots": ["~/.bun/types"]
}
}