Sha256: 1c3cdf85d1b482a81224a62df53a1c7a81db1b1ef082fdc8dc4e1723f06b1c51

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

Contents

#!/usr/bin/env ruby

require 'commander/import'
require_relative '../lib/skeleton'

module Skeleton
	program :version, VERSION
	program :description, 'CLI for fast generating multi language page objects from iOS and Android screens.'

	command :scan do |c|
	  c.syntax = 'skeleton scan [options]'
	  c.description = 'Make screen objects'
	  c.example 'description', 'skeleton scan -p ios -u 749575366595763538563 -b com.my.bundle'
	  c.option '-p', '--platform PLATFORM', String, 'Set device platform: android or ios'
	  c.option '-u', '--udid UDID', String, 'Set device UDID'
	  c.option '-b', '--bundle BUNDLE', String, 'Set Bundle ID for your app [required for iOS]'
	  c.action do |_args, options|
	    Skeleton.new(options).run
	  end
	end

	command :clear do |c|
	  c.syntax = 'skeleton clear'
	  c.description = 'Clear user cache'
	  c.example 'description', 'skeleton clear'
	  c.action do |_args, _options|
			base = Base.new
	    base.clear
	    base.log.info("Successfully clear user cache")
	  end
	end

	command :server do |c|
		c.syntax = 'skeleton server'
		c.description = 'Run skeleton web-server'
		c.example 'description', 'skeleton server'
		c.option '-p', '--port PORT', String, 'Set web-server port'
		c.action do |_args, options|
			options.default(port: 4567)
			system("cd ../html/ && ruby server.rb #{options.port}")
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
skeleton-ui-0.1.2 bin/skeleton
skeleton-ui-0.1.1 bin/skeleton