Skip to content

Commit

Permalink
Merge pull request #1075 from ninoseki/split-rake-tasks
Browse files Browse the repository at this point in the history
Split rake tasks
  • Loading branch information
ninoseki authored Mar 23, 2024
2 parents 73a5124 + 3bfecd1 commit 83f8e38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
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

0 comments on commit 83f8e38

Please sign in to comment.