forked from rfletcher/safari-json-formatter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
36 lines (27 loc) · 809 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
task :default => :build
desc 'Build the extension into a working bundle'
task :build do
build_dir = "JSON Formatter.safariextension"
FileUtils.rm_rf build_dir
FileUtils.mkdir_p build_dir
assets = [
"resources/*",
"src/*"
]
assets.each do |glob|
Dir.glob(glob).each do |src|
puts "linking #{src}"
dest = "#{build_dir}/#{File.basename(src)}"
FileUtils.mkdir_p File.dirname dest
FileUtils.link src, dest
end
end
puts <<-EOM
********************************************************
You can now use the Safari Extension Builder to compress
the bundle into a .safariextz for deployment.
A reminder for when I forget how to find the builder:
Safari > Develop > Show Extension Builder
********************************************************
EOM
end