aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml11
-rw-r--r--Makefile8
-rw-r--r--www/bulma.min.css (renamed from www/assets/bulma.min.css)0
-rw-r--r--www/index.html2
-rw-r--r--www/webpack.config.js18
5 files changed, 15 insertions, 24 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d94285f..97ceee6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,23 +14,12 @@ default = ["console_error_panic_hook"]
wasm-bindgen = "0.2.63"
getrandom = { version = "0.2", features = ["js"] }
rand = "0.8.5"
-
-# The `console_error_panic_hook` crate provides better debugging of panics by
-# logging them with `console.error`. This is great for development, but requires
-# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
-# code size when deploying.
console_error_panic_hook = { version = "0.1.6", optional = true }
-# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
-# compared to the default allocator's ~10K. It is slower than the default
-# allocator, however.
-#
-# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
wee_alloc = { version = "0.4.5", optional = true }
[dev-dependencies]
wasm-bindgen-test = "0.3.13"
[profile.release]
-# Tell `rustc` to optimize for small code size.
opt-level = "s"
diff --git a/Makefile b/Makefile
index b459eb2..5ae5e87 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
-
-
all: cargo
cd www && \
npm install && \
npm run build
+serve: cargo
+ cd www && \
+ npm install && \
+ npm run start
cargo:
- wasm-pack build --no-typescript --release \ No newline at end of file
+ wasm-pack build --no-typescript --release
diff --git a/www/assets/bulma.min.css b/www/bulma.min.css
index be16f72..be16f72 100644
--- a/www/assets/bulma.min.css
+++ b/www/bulma.min.css
diff --git a/www/index.html b/www/index.html
index fe4ac5f..2910ad5 100644
--- a/www/index.html
+++ b/www/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link type="text/css" rel="stylesheet" href="assets/bulma.min.css">
+ <link type="text/css" rel="stylesheet" href="/bulma.min.css">
<title>Password generator</title>
</head>
<body>
diff --git a/www/webpack.config.js b/www/webpack.config.js
index 80ad814..6d82e1f 100644
--- a/www/webpack.config.js
+++ b/www/webpack.config.js
@@ -2,13 +2,13 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require('path');
module.exports = {
- entry: "./bootstrap.js",
- output: {
- path: path.resolve(__dirname, "dist"),
- filename: "bootstrap.js",
- },
- mode: "development",
- plugins: [
- new CopyWebpackPlugin(['index.html'])
- ],
+ entry: "./bootstrap.js",
+ output: {
+ path: path.resolve(__dirname, "dist"),
+ filename: "bootstrap.js",
+ },
+ mode: "development",
+ plugins: [
+ new CopyWebpackPlugin(['index.html', 'bulma.min.css'])
+ ],
};