diff options
author | gabrielgio <gabriel.giovanini@pm.me> | 2022-03-25 17:55:28 +0100 |
---|---|---|
committer | gabrielgio <gabriel.giovanini@pm.me> | 2022-03-25 17:55:28 +0100 |
commit | ed203f99dd8625d5c601e6f0b1bedfdc181517dd (patch) | |
tree | 185f1a38c8b6bb4aff79131e95656742f22dc084 | |
parent | 0bef00b83e965aa350df1cd6a16c6ac39c388d93 (diff) | |
download | genpass-ed203f99dd8625d5c601e6f0b1bedfdc181517dd.tar.gz genpass-ed203f99dd8625d5c601e6f0b1bedfdc181517dd.tar.bz2 genpass-ed203f99dd8625d5c601e6f0b1bedfdc181517dd.zip |
ref: Pack bulman.css
Add `bulma.min.css` file to be copied when bundling `www` project.
-rw-r--r-- | Cargo.toml | 11 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | www/bulma.min.css (renamed from www/assets/bulma.min.css) | 0 | ||||
-rw-r--r-- | www/index.html | 2 | ||||
-rw-r--r-- | www/webpack.config.js | 18 |
5 files changed, 15 insertions, 24 deletions
@@ -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" @@ -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']) + ], }; |