From eb60f8671ef9d7a37ffe9819f677007fd07ca4d0 Mon Sep 17 00:00:00 2001 From: Manabu Niseki Date: Sat, 23 Mar 2024 11:03:35 +0900 Subject: [PATCH 1/2] refactor: define build:frontend task --- Rakefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index f48e4546..3eb47314 100644 --- a/Rakefile +++ b/Rakefile @@ -55,17 +55,21 @@ namespace :build do puts "Swagger doc is built in #{elapsed}s" end + + desc "Build frontend assets" + task :frontend do + # Build frontend assets + sh "cd frontend && npm install && npm run docs && npm run build-only" + # Copy built assets into ./lib/web/public/ + sh "rm -rf ./lib/mihari/web/public/" + sh "mkdir -p ./lib/mihari/web/public/" + sh "cp -r frontend/dist/* ./lib/mihari/web/public" + end end task :build do Rake::Task["build:swagger"].invoke - - # Build ReDocs docs & frontend assets - sh "cd frontend && npm install && npm run docs && npm run build-only" - # Copy built assets into ./lib/web/public/ - sh "rm -rf ./lib/mihari/web/public/" - sh "mkdir -p ./lib/mihari/web/public/" - sh "cp -r frontend/dist/* ./lib/mihari/web/public" + Rake::Task["build:frontend"].invoke end # require it later enables doing pre-build step (= build the frontend app) From 3bfecd116ffc0dbaf12b30fc0a470ee5d58e9c1c Mon Sep 17 00:00:00 2001 From: Manabu Niseki Date: Sat, 23 Mar 2024 11:03:41 +0900 Subject: [PATCH 2/2] fix: remove import --- frontend/src/main.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 443a5666..4ff17b64 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -1,6 +1,5 @@ import "bulma/css/bulma.css" import "bulma-helpers/css/bulma-helpers.min.css" -import "bulma-switch/dist/css/bulma-switch.min.css" import "font-awesome-animation/css/font-awesome-animation.min.css" import { library } from "@fortawesome/fontawesome-svg-core"