Sha256: 5cdfc6479bd3c56d2b01134fd863314b7d8cef59a65b29aed4574ef61f141ecc
Contents?: true
Size: 1009 Bytes
Versions: 5
Compression:
Stored size: 1009 Bytes
Contents
module BowerVendor class Setup < Base def execute create_bowerrc create_bower_json end def create_bower_json data = { name: 'autogenerated', dependencies: { }, resolutions: { }, } vendors.each do |vendor_key, vendor| version = vendor['version'] tag_version = version git = vendor['git'] tag = vendor['tag'] if git tag_version = tag ? "#{git}##{tag}" : git end data[:dependencies][vendor_key] = tag_version data[:resolutions][vendor_key] = tag_version end target_file = "#{work_dir}/bower.json" File.write(target_file, JSON.pretty_generate(data)) puts "Wrote: #{target_file}" end def create_bowerrc data = { directory: "bower_components" } target_file = "#{work_dir}/.bowerrc" File.write(target_file, JSON.pretty_generate(data)) puts "Wrote: #{target_file}" end end end
Version data entries
5 entries across 5 versions & 1 rubygems