From 1e5726b70f71b305592b4fb25c4e90dd7a971f94 Mon Sep 17 00:00:00 2001 From: Serhii Horodilov Date: Wed, 21 Feb 2024 17:18:29 +0200 Subject: [PATCH] Fixes GH-39 --- package.json | 2 +- src/views/detail_view.hbs | 4 ++-- src/views/form_view.hbs | 4 ++-- src/views/list_view.hbs | 4 ++-- src/views/profile_view.hbs | 4 ++-- src/views/signin_view.hbs | 4 ++-- src/views/signup_view.hbs | 4 ++-- webpack.config.js | 33 ++++++++++++++++++++++----------- 8 files changed, 35 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 85a63e4..cbbf35e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tasktracker-bootstrap", - "version": "1.2.0", + "version": "1.3.0", "description": "Task tracker site bootstrap5 templates", "private": true, "scripts": { diff --git a/src/views/detail_view.hbs b/src/views/detail_view.hbs index b82d02a..c1053c9 100644 --- a/src/views/detail_view.hbs +++ b/src/views/detail_view.hbs @@ -7,8 +7,8 @@ - - + + {{title}} | Task Tracker diff --git a/src/views/form_view.hbs b/src/views/form_view.hbs index 2114831..08e6962 100644 --- a/src/views/form_view.hbs +++ b/src/views/form_view.hbs @@ -7,8 +7,8 @@ - - + + {{title}} | Task Tracker diff --git a/src/views/list_view.hbs b/src/views/list_view.hbs index 455cb8f..2093e26 100644 --- a/src/views/list_view.hbs +++ b/src/views/list_view.hbs @@ -7,8 +7,8 @@ - - + + {{title}} | Task Tracker diff --git a/src/views/profile_view.hbs b/src/views/profile_view.hbs index 245a9de..1b632e8 100644 --- a/src/views/profile_view.hbs +++ b/src/views/profile_view.hbs @@ -7,8 +7,8 @@ - - + + {{title}} | Task Tracker diff --git a/src/views/signin_view.hbs b/src/views/signin_view.hbs index 8954e0b..8154712 100644 --- a/src/views/signin_view.hbs +++ b/src/views/signin_view.hbs @@ -7,8 +7,8 @@ - - + + {{title}} | Task Tracker diff --git a/src/views/signup_view.hbs b/src/views/signup_view.hbs index 5b2d078..46f19f2 100644 --- a/src/views/signup_view.hbs +++ b/src/views/signup_view.hbs @@ -7,8 +7,8 @@ - - + + {{title}} | Task Tracker diff --git a/webpack.config.js b/webpack.config.js index 026811f..0e77561 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,12 +14,17 @@ const HTMLWebpackPlugin = require("html-webpack-plugin") const MiniCSSExtractPlugin = require("mini-css-extract-plugin") const api = require("./api/settings") +const templateParameters = { + favicon_png: "../assets/img/favicon.png", + favicon_svg: "../assets/img/favicon.svg", +} + // webpack config object // noinspection WebpackConfigHighlighting,HttpUrlsUsage module.exports = { mode: "development", output: { - filename: "js/main.bundle.js", + filename: "assets/js/main.bundle.js", path: path.resolve(__dirname, "dist"), clean: true }, @@ -35,46 +40,52 @@ module.exports = { } }, plugins: [ - new MiniCSSExtractPlugin({filename: "css/main.min.css"}), + new MiniCSSExtractPlugin({filename: "assets/css/main.min.css"}), new HTMLWebpackPlugin({ template: path.resolve(__dirname, "src/views/list_view.hbs"), - filename: "tasks/task_list.html", + filename: "templates/task_list.html", templateParameters: { + ...templateParameters, title: "Tasks List", } }), new HTMLWebpackPlugin({ template: path.resolve(__dirname, "src/views/detail_view.hbs"), - filename: "tasks/task_detail.html", + filename: "templates/task_detail.html", templateParameters: { + ...templateParameters, title: "Tasks Details", } }), new HTMLWebpackPlugin({ template: path.resolve(__dirname, "src/views/form_view.hbs"), - filename: "tasks/task_form.html", + filename: "templates/task_form.html", templateParameters: { + ...templateParameters, title: "Task Form", } }), new HTMLWebpackPlugin({ template: path.resolve(__dirname, "src/views/profile_view.hbs"), - filename: "users/profile.html", + filename: "templates/profile.html", templateParameters: { + ...templateParameters, title: "User Profile", } }), new HTMLWebpackPlugin({ template: path.resolve(__dirname, "src/views/signup_view.hbs"), - filename: "auth/signup.html", + filename: "templates/signup.html", templateParameters: { + ...templateParameters, title: "Sign Up", } }), new HTMLWebpackPlugin({ template: path.resolve(__dirname, "src/views/signin_view.hbs"), - filename: "auth/signin.html", + filename: "templates/signin.html", templateParameters: { + ...templateParameters, title: "Sign In", } }), @@ -101,14 +112,14 @@ module.exports = { test: /\.(png|svg|jpg|jpeg|gif)$/i, type: "asset/resource", generator: { - filename: "img/[name][ext]" + filename: "assets/img/[name][ext]" } }, { test: /\.(woff|woff2|ttf|eot)$/, type: "asset/resource", generator: { - filename: "fonts/[name][ext][query]" + filename: "assets/fonts/[name][ext][query]" } }, { @@ -116,7 +127,7 @@ module.exports = { scheme: "data", type: "asset/resource", generator: { - filename: "icons/[hash].svg" + filename: "assets/icons/[hash].svg" } }, {