forked from UNC-Libraries/jquery.xmleditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
31 lines (24 loc) · 817 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
require "rubygems"
require "sprockets"
task :default => "jquery.xmleditor.js"
task "jquery.xmleditor.js" => FileList.new("src/*") do
environment = Sprockets::Environment.new
environment.append_path "src"
File.open("jquery.xmleditor.js", "w+") do |f|
f << ";(function($){" + environment.find_asset("jquery.xmleditor.js").to_s + "})(jQuery);"
end
end
task "xsd2json.js" => FileList.new("xsd/src/*") do
environment = Sprockets::Environment.new
environment.append_path "xsd/src"
File.open("xsd/xsd2json.js", "w+") do |f|
f << ";var Xsd2Json = function() {" + environment.find_asset("xsd2json.js").to_s + "; return Xsd2Json;}.call();"
end
end
task "mods.js" do
FileUtils.cd("xsd")
system "phantomjs build.js ../mods.js"
end
task :clean do
FileUtils.rm_f("jquery.xmleditor.js")
end