module WebExtNativeAppPacker::Helper
Public Class Methods
mkdir(out_path)
click to toggle source
# File lib/web-ext-native-app-packer.rb, line 220 def self.mkdir(out_path) dir = out_path[0, out_path.rindex('/')] unless File.exist?(dir) FileUtils.mkdir_p(dir) end end
render(v, erb_path, out_path)
click to toggle source
# File lib/web-ext-native-app-packer.rb, line 210 def self.render(v, erb_path, out_path) mkdir(out_path) @v = v b = binding erb = ::ERB.new(File.new(erb_path).read) File.open(out_path, 'w') do |f| f.write erb.result(b) end end