forked from gwatcha/reaper-keys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
42 lines (33 loc) · 887 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# frozen_string_literal: true
# Rakefile
require './scripts/generator'
require './scripts/refractorer'
require 'fileutils'
@root_dir_path = Dir.pwd[%r{[^/]*$}] + '/'
@key_script_dir = 'key_scripts/'
@keymap_path = 'reaper-keys.ReaperKeyMap'
@definitions_dir = 'definitions/'
task default: %i[clean generate build]
task :clean do
FileUtils.rm_rf(@key_script_dir)
Dir.mkdir(@key_script_dir)
FileUtils.rm_f(@keymap_path)
end
task :build do
`mkdir -p dist`
`rm -rf dist/*`
`zip -r dist/reaper-keys.zip * -x dist img/* img`
end
task :generate do
generator = Generator.new(@root_dir_path, @keymap_path, @key_script_dir)
generator.gen_interface
end
namespace :refractor do
refractorer = Refractorer.new(@definitions_dir)
task :sort_actions do
refractorer.sort_actions
end
task :delete_duplicate_actions do
refractorer.delete_duplicate_actions
end
end