Skip to content

Commit

Permalink
Updated to new handlebars plugin for Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
zgoda committed Nov 21, 2023
1 parent 804dadd commit e399658
Show file tree
Hide file tree
Showing 7 changed files with 704 additions and 952 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions contact/index.html → contact/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<h1>Kontakt</h1>
</section>
<section>
<p>Z autorem można się skontaktować przez:</p>
<p>Z autorem można się skontaktować przez:</p>
<ul>
<li>w przypadku zauważonych błędów, nieścisłości lub sugestii usprawnień - <a href="https://github.com/zgoda/curingtables/issues">system zgłoszeń repozytorium na Githubie</a></li>
<li>ogólna dyskusja toczy się w <a href="https://wedlinydomowe.pl/forum/topic/18619-peklowanie-mokre-kalkulator/">wydzielonym wątku na forum WB</a> i w komentarzach do <a href="https://www.facebook.com/groups/wedzarniczabrac/posts/1959070834254942/">posta ze zgłoszeniem na grupie WB na Facebooku</a></li>
<li>w pozostałych sprawach - przez wiadomość prywatną <a href="https://wedlinydomowe.pl/forum/">na forum WB</a></li>
<li>w pozostałych sprawach - przez wiadomość prywatną <a href="https://wedlinydomowe.pl/forum/">na forum WB</a></li>
</ul>
</section>
</main>
Expand Down
1,615 changes: 681 additions & 934 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "curingtables",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand All @@ -15,26 +16,26 @@
"types": "./index.d.ts",
"dependencies": {
"@picocss/pico": "^1.5.10",
"preact": "^10.18.1",
"preact": "^10.19.2",
"preact-feather": "^4.2.1",
"uid": "^2.0.2"
},
"devDependencies": {
"@preact/preset-vite": "^2.6.0",
"@preact/preset-vite": "^2.7.0",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/preact": "^3.2.3",
"@vituum/vite-plugin-handlebars": "^1.1.0",
"cross-env": "^7.0.3",
"eslint": "^8.52.0",
"eslint": "^8.54.0",
"eslint-config-preact": "^1.3.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"https-localhost": "^4.7.1",
"jest": "^29.7.0",
"jest-preset-preact": "^4.1.0",
"prettier": "^3.0.3",
"vite": "^4.5.0",
"vite-plugin-handlebars": "^1.6.0",
"vite-plugin-pwa": "^0.16.6",
"prettier": "^3.1.0",
"vite": "^5.0.1",
"vite-plugin-pwa": "^0.17.0",
"workbox-window": "^7.0.0"
}
}
2 changes: 1 addition & 1 deletion partials/nav.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nav>
<ul>
<li>
<a href="{{resolve-from-root '/'}}">
<a href="/">
<span class='icon'><svg><use xlink:href='#arrow-left'></use></svg></span>&nbsp;Powrót do strony głównej
</a>
</li>
Expand Down
File renamed without changes.
20 changes: 12 additions & 8 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ import { defineConfig } from 'vite';
import { resolve } from 'path';
import preact from '@preact/preset-vite';
import { VitePWA } from 'vite-plugin-pwa';
import handlebars from 'vite-plugin-handlebars';
import handlebars from '@vituum/vite-plugin-handlebars';

export default defineConfig({
plugins: [
// https://github.com/alexlafroscia/vite-plugin-handlebars/issues/214
// @ts-ignore
handlebars({
partialDirectory: resolve(__dirname, 'partials'),
partials: {
directory: resolve(__dirname, 'partials'),
extname: false,
},
formats: ['hbs', 'hbs.html'],
}),
preact(),
VitePWA({
Expand Down Expand Up @@ -43,12 +47,12 @@ export default defineConfig({
],
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
about: resolve(__dirname, 'about/index.html'),
privacy: resolve(__dirname, 'privacy/index.html'),
contact: resolve(__dirname, 'contact/index.html'),
},
input: [
resolve(__dirname, 'index.html'),
resolve(__dirname, 'about', 'index.hbs.html'),
resolve(__dirname, 'privacy', 'index.hbs.html'),
resolve(__dirname, 'contact', 'index.hbs.html'),
],
},
},
server: {
Expand Down

0 comments on commit e399658

Please sign in to comment.