summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-18 21:36:16 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-18 21:36:16 +0800
commitf625441429bfe1e10b1532873d78ce41084e178c (patch)
treeba105f3056fb39af06c34c599e0d333c98a19375
parent5f40484088e509e49675813c34be3b53998514ea (diff)
Preparing to use Emscripten
-rw-r--r--.gitignore11
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac5
-rw-r--r--pages/index.c6
4 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b72f9be..58affe2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,13 @@
*~
*.swp
+Makefile.in
+aclocal.m4
+autom4te.cache
+autoscan*.log
+build
+compile
+configure
+configure.scan
+depcomp
+install-sh
+missing
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..006bcc6
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,3 @@
+bin_PROGRAMS = index.js
+index_js_SOURCES = pages/index.c
+index_js_LDFLAGS = -s FETCH
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..8cf2213
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,5 @@
+AC_INIT([shopify-frontend-template-html], [0.0], [prabowo@darapsa.org])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
+AC_PROG_CC
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/pages/index.c b/pages/index.c
new file mode 100644
index 0000000..08aa2d6
--- /dev/null
+++ b/pages/index.c
@@ -0,0 +1,6 @@
+#include <emscripten/fetch.h>
+
+int main(int argc, char *argv[])
+{
+ EM_ASM(authenticatedFetch("/products"));
+}