From 46b6037644c761369e689704f8e7b857959da155 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 19 Nov 2024 16:19:35 -0500 Subject: feat(compile): ability to embed local data files (#26934) ``` > deno compile --allow-read=. --include data-file.txt main.js ``` This only applies to files on the filesystem. For remote modules, that's going to have to wait for `import ... from "./data.txt" with { "type": "bytes" }` or whatever it will be. --- tests/specs/compile/include_data_files/main.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/specs/compile/include_data_files/main.js (limited to 'tests/specs/compile/include_data_files/main.js') diff --git a/tests/specs/compile/include_data_files/main.js b/tests/specs/compile/include_data_files/main.js new file mode 100644 index 000000000..4c1f1e98d --- /dev/null +++ b/tests/specs/compile/include_data_files/main.js @@ -0,0 +1 @@ +console.log(Deno.readTextFileSync("./data-file.txt").trim()); -- cgit v1.2.3