From ec6e657023bec0b7b5b35f6288cecc131c151285 Mon Sep 17 00:00:00 2001 From: Ashley Williams <ashley666ashley@gmail.com> Date: Wed, 1 Aug 2018 16:43:51 -0400 Subject: [PATCH] feat(scaffold): add html and js and webpack config --- index.html | 10 ++++++++++ index.js | 4 ++++ webpack.config.js | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 index.html create mode 100644 index.js create mode 100644 webpack.config.js diff --git a/index.html b/index.html new file mode 100644 index 0000000..88ec74f --- /dev/null +++ b/index.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Hello wasm-pack!</title> + </head> + <body> + <script src="./index.js"></script> + </body> +</html> diff --git a/index.js b/index.js new file mode 100644 index 0000000..a092ff3 --- /dev/null +++ b/index.js @@ -0,0 +1,4 @@ +// const wasm_math = import("@MYSCOPE/wasm-math/wasm_math.js"); +// wasm_math.then(wasm_add => { +// wasm_math.alert_add(2,3); +// }); diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..1070c85 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,10 @@ +const path = require('path'); + +module.exports = { + entry: "./index.js", + output: { + path: path.resolve(__dirname, "dist"), + filename: "index.js", + }, + mode: "development", +}; -- GitLab