You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
884B

  1. require 'rake/clean'
  2. require 'pathname'
  3. source_dir = Pathname('.').expand_path
  4. dest_dir = Pathname('../res').expand_path
  5. desc 'Build the site'
  6. task :svg do
  7. sh 'bundle', 'exec', 'jekyll', 'b', '--trace'
  8. end
  9. module_names = ['booster-stage', 'hostage', 'stage', 'swave', 'upstage']
  10. panel_deps = []
  11. module_names.each do |module_name|
  12. source_file = source_dir / module_name / '-panel.svg'
  13. intermediate_file = dest_dir / module_name / '-panel.svg'
  14. panel_file = dest_dir / module_name / 'panel.svg'
  15. file intermediate_file => source_file do
  16. Rake::Task[:svg].invoke
  17. end
  18. file panel_file => intermediate_file do
  19. sh '/Applications/Inkscape.app/Contents/Resources/script', '--export-text-to-path', "--export-plain-svg=#{panel_file.to_s}", intermediate_file.to_s
  20. end
  21. task panels: panel_file
  22. end
  23. task all: [:svg, :panels]
  24. task default: :all
  25. CLEAN.include 'res'