forked from jinzhu/vrome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
30 lines (22 loc) · 1.04 KB
/
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
require "bundler/setup"
require 'json'
task :build do
system("bundle exec bluecloth README.mkd > ./src/README.html")
system("bundle exec bluecloth Features.mkd > ./src/files/features.html")
system("bundle exec bluecloth ChangeLog.mkd > ./src/files/changelog.html")
system("bundle exec bluecloth Thanks.mkd > ./src/files/thanks.html")
file = File.join(File.dirname(__FILE__),'src','manifest_pretty.json')
json = JSON.parse(File.read(file))
json["version"] = File.read('Version').strip
Dir.chdir('src') do
json["content_scripts"][0]["js"] = Dir['shared/*.js'].concat(Dir['frontend/modules/*.js']).concat(["frontend/main.js" ])
json["content_scripts"][0]["css"] = ['styles/main.css']
end
# json["app"] = {"launch" => { "web_url" => "https://github.com/jinzhu/vrome#readme" }}
# json["homepage_url"] = "https://github.com/jinzhu/vrome"
File.open(File.join(File.dirname(__FILE__),'src','manifest.json'),'w+') do |f|
f << json.to_json
end
system("zip -r vrome.zip src/; cp vrome.zip ~")
end
task :default => [:build]