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) 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"