bin/pow-index in pow-index-0.0.5 vs bin/pow-index in pow-index-0.0.6
- old
+ new
@@ -4,5 +4,15 @@
binpath = "#{File.expand_path(File.dirname(__FILE__)).chomp}/../"
linkname = ARGV[0] || 'index'
powpath = "#{ENV['HOME']}/.pow/#{linkname}"
FileUtils.ln_s(binpath, powpath) unless File.exists?(powpath)
puts "Created #{powpath}"
+
+## First snapshots generation
+POW_PATH = "#{ENV['HOME']}/.pow"
+@snaps = Dir[POW_PATH + "/*"].map { |symlink|
+ link = symlink.rpartition("/").last
+ unless link.eql?("default")
+ system "webkit2png -D #{binpath}public/snaps/ -o #{link} -C http://#{link}.dev"
+ puts "#{link.capitalize} snapshot generated"
+ end
+}
\ No newline at end of file