Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split rake tasks #1075

Merged
merged 2 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion frontend/src/main.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down