Sha256: d07b404ddd656b1b1b490f88f9ce651e75c22aed0d8270b635e2f59b008ec73f

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

#!/usr/bin/env ruby

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

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.option '--[no-]browser', "Not open the browser at the end of skeleton's work"
	  c.action do |_args, options|
			options.default(browser: true)
	    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("ruby #{Base::ROOT_DIR}/html/server.rb #{options.port}")
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skeleton-ui-0.1.9 bin/skeleton