forked from grosser/textpow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (26 loc) · 726 Bytes
/
Copy pathRakefile
File metadata and controls
30 lines (26 loc) · 726 Bytes
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
require "bundler/setup"
require "bundler/gem_tasks"
require "bump/tasks"
task :default do
sh "rspec spec/"
end
desc "Convert a plist to a .syntax file"
task :convert, :in, :out do |t,args|
convert(args[:in], args[:out] || 'out.syntax')
end
desc "update syntaxes from their original source"
task :update_syntax do
{
'source.scss' => 'https://raw.github.com/kuroir/SCSS.tmbundle/master/Syntaxes/SCSS.tmLanguage'
}.each do |scope_name, url|
`curl '#{url}' > temp.plist`
convert('temp.plist', "lib/textpow/syntax/#{scope_name}.syntax")
`rm temp.plist`
end
end
def convert(from, to)
require 'plist'
require 'yaml'
yaml = Plist.parse_xml(from).to_yaml
File.open(to,'w'){|f| f.write(yaml) }
end