Skip to content

Commit

Permalink
Merge pull request #7 from SeraphyBR/code_highligh_wasm_bindgen_esbuild
Browse files Browse the repository at this point in the history
Code highligh wasm bindgen esbuild
  • Loading branch information
SeraphyBR authored May 4, 2024
2 parents f44277e + 04effba commit 22b1aeb
Show file tree
Hide file tree
Showing 18 changed files with 682 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2

[*.md]
max_line_length = off
trim_trailing_whitespace = false
5 changes: 4 additions & 1 deletion .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ jobs:
- name: Add WASM target
run: rustup target add wasm32-unknown-unknown

- name: Download and install Node Dependencies (Tailwind)
- name: Download and install Node Dependencies
run: npm install

- name: Run npm build
run: npm run build

- name: lint
run: cargo clippy & cargo fmt

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target
/dist
/node_modules
/node_modules
/esbuild
src/**/*.min.js
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"css.validate": false,
"html.autoClosingTags": true,
"rust-analyzer.semanticHighlighting.punctuation.enable": true,
Expand Down
2 changes: 1 addition & 1 deletion Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target = "index.html"
dist = "dist"

[watch]
ignore = ["./src/markdown_posts.rs"]
ignore = ["./src/markdown_posts.rs", "./esbuild"]

[serve]
port = 3000
Expand Down
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
use std::fs;
use std::io::Write;
use std::process::Command;

fn main() {
let _ = Command::new("npm")
.args(["run", "build"])
.output()
.expect("Falha ao executar npm run build");

create_markdown_posts_with_files_to_include();
}

Expand Down
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<!-- If using Tailwind with Leptos CSR, see https://trunkrs.dev/assets/#tailwind instead-->
<link data-trunk rel="tailwind-css" href="public/tailwind.css" />

<link data-trunk rel="css" href="public/highlight.css" />

<!-- Include favicon in dist output: see https://trunkrs.dev/assets/#icon -->
<link data-trunk rel="icon" href="public/favicon.ico" />
<link
Expand Down Expand Up @@ -34,13 +36,15 @@
crossorigin="anonymous"
></script>

<!--Fira Sans Font-->
<!--Fonts google-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"
/>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@500&display=swap" rel="stylesheet">


<title>SeraphyBR's Blog</title>

Expand Down
Loading

0 comments on commit 22b1aeb

Please sign in to comment.