Sha256: b6242cf8592ac74f9e33f4fabbd9018a83fc848b2a6fd4837eb658ebbfad8a78

Contents?: true

Size: 509 Bytes

Versions: 7

Compression:

Stored size: 509 Bytes

Contents

module Xcake
  module Generator
    # This build phase generator detects XCAsset bundles
    # and adds them to the copy resources phase.
    #
    class CopyXCAssetsBuildPhase < CopyResourcesBuildPhase

      def self.can_install_node(node)
        File.directory?(node.path) == true &&
        [".xcassets"].include?(File.extname(node.path)) == true
      end

      def visit_node(node)
        super

        #Ignore all files inside of the XCAssets
        node.children = []
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
xcake-0.3.1 lib/xcake/generator/build_phase/copy_xcassets_build_phase.rb
xcake-0.3.0 lib/xcake/generator/build_phase/copy_xcassets_build_phase.rb
xcake-0.1.9 lib/xcake/generator/build_phase/copy_xcassets_build_phase.rb
xcake-0.1.8 lib/xcake/generator/build_phase/copy_xcassets_build_phase.rb
xcake-0.1.7 lib/xcake/generator/build_phase/copy_xcassets_build_phase.rb
xcake-0.1.6 lib/xcake/generator/build_phase/copy_xcassets_build_phase.rb
xcake-0.1.5 lib/xcake/generator/build_phase/copy_xcassets_build_phase.rb