]> ToastFreeware Gitweb - philipp/winterrodeln/mediawiki_extensions/wrmap.git/commitdiff
"Hello world" now also works with import.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 26 Oct 2023 14:37:23 +0000 (16:37 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Fri, 27 Oct 2023 11:24:08 +0000 (13:24 +0200)
.gitignore
src/hello_world.ts
src/hello_world_lib.ts [new file with mode: 0644]

index 8f1faeea389f96bda98113f6a1ee0c9569540dbf..315ab99fe2f55eec296c751da759185a29222c82 100644 (file)
@@ -1 +1,2 @@
 /.vscode/
+/node_modules/
\ No newline at end of file
index 940a3ff0ec202582f037ef6f743d606fadab9f32..99879a2987f00a4ddbee2462abee8b1396d51256 100644 (file)
@@ -1 +1,4 @@
-console.log("Hello world!");
+import { greet } from '../src/hello_world_lib.ts'
+
+
+greet();
diff --git a/src/hello_world_lib.ts b/src/hello_world_lib.ts
new file mode 100644 (file)
index 0000000..733ad62
--- /dev/null
@@ -0,0 +1,3 @@
+export function greet() {
+    console.log("Greetings!");
+}