Sha256: 22302797e59d693134c1485c5d632cd445f6d819e6b96f1aff70ab5eb814266a

Contents?: true

Size: 682 Bytes

Versions: 3

Compression:

Stored size: 682 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|
        data[:dependencies][vendor_key] = vendor['version']
        data[:resolutions][vendor_key] = vendor['version']
      end
      File.write("#{work_dir}/bower.json", JSON.pretty_generate(data))
    end

    def create_bowerrc
      data = {
        directory: "bower_components"
      }
      File.write("#{work_dir}/.bowerrc", JSON.pretty_generate(data))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bower_vendor-0.0.6 lib/bower_vendor/setup.rb
bower_vendor-0.0.5 lib/bower_vendor/setup.rb
bower_vendor-0.0.4 lib/bower_vendor/setup.rb