Sha256: 2ec948ee8a9ebbd5e6439afcd2638718752809fa79fcfa1f0f72ceb6ba68d261
Contents?: true
Size: 1.14 KB
Versions: 5
Compression:
Stored size: 1.14 KB
Contents
#!/usr/bin/env ruby require 'thor' require 'xcodeproj_utils' class CLI < Thor desc "xcp_utils lines PROJECT_NAME TARGET_NAME", "Count source lines of files" option :header_only, :type => :boolean, :default => false, :desc => 'Count only header files' option :source_only, :type => :boolean, :default => false, :desc => 'Count only source files' def lines(proj_name, target_name) header_only = options[:header_only] source_only = options[:source_only] proj = XcodeprojUtils::Project.new(proj_name, target_name) if header_only or source_only puts proj.wc(header_only=header_only, source_only=source_only) else puts proj.wc() end end desc "xcp_utils show PROJECT_NAME TARGET_NAME", "Show files in specified target" option :kind, :type => :string, :default => 'source', :desc => 'source or resource' option :fullpath, :type => :boolean, :default => false, :desc => 'full paths will be shown if specified' def show(proj_name, target_name) kind = options[:kind] fullpath = options[:fullpath] proj = XcodeprojUtils::Project.new(proj_name, target_name) proj.show(kind, fullpath) end end CLI.start(ARGV)
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
xcodeproj_utils-0.1.4 | bin/xcp_utils |
xcodeproj_utils-0.1.3 | bin/xcp_utils |
xcodeproj_utils-0.1.2 | bin/xcp_utils |
xcodeproj_utils-0.1.1 | bin/xcp_utils |
xcodeproj_utils-0.1.0 | bin/xcp_utils |