Sha256: 4502bdc43c4f9ffd28c55e277043f114f077c8d7c3cce5ef605082a590c1dfa5

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

require 'cocoadepot'
require_relative '../source/lib_bundle'
require_relative '../code_generator/code_generator'
module CocoaDepot
  # The abstract for the container that contains a component. In cocoa
  # it may be a pod.
  class Component
    # Check the aim bundle is exist or not
    def check_auto_compoment!
      all_component_resource_paths = auto_assets_generation_path.children.select(&:directory?)
      all_component_resource_paths.each do |child|
        app_id = child.basename
        bundle_name = auto_bundle_name
        component_name = "#{bundle_name}#{app_id.to_s.camelize}"
        lib = KCommercial::Resources::LibBundleGenerator.new(component_name, auto_bundle_name, child)
        lib.generate!
      end
      # rm assets
      FileUtils.rm_rf(auto_assets_generation_path)
    end

    def auto_compoment_list
      auto_assets_generation_path.mkdir unless auto_assets_generation_path.exist?
      all_component_resource_paths = auto_assets_generation_path.children.select(&:directory?)
      components = all_component_resource_paths.map do |c|
        bundle_name = auto_bundle_name
        app_id = c.basename
        component_name = "#{bundle_name}#{app_id.to_s.camelize}"
        component_name
      end
      components
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
KCommercialPipeline-0.2.5.1 lib/KCommercialPipeline/core/resource/i18n/bundle_generator.rb