Sha256: 01a71e7cdfecf16758a9a61170594dd7b2df77789a0a18b56f3f0f7724d1835a

Contents?: true

Size: 965 Bytes

Versions: 1

Compression:

Stored size: 965 Bytes

Contents

require 'optparse'
require 'find'

require 'swift_lib_templater/copy_template_command.rb'
require 'swift_lib_templater/get_framework_name_command.rb'
require 'swift_lib_templater/rename_files_command.rb'
require 'swift_lib_templater/initialize_git_repository_command.rb'

def systemWithoutOutput(command)
	system command, ">/dev/null 2>&1"
end

module SwiftLibTemplater
	begin
		puts "Framework name ?"
		project_name = GetFrameworkNameCommand.new.execute

		project_dest = Dir.pwd
		project_folder = File.expand_path("#{project_dest}/#{project_name}")

		print "\nGenerating files... "
		CopyTemplateCommand.new(project_folder).execute
		RenameFilesCommand.new(project_folder, project_name).execute
		puts "āœ…"

		print "Initializing git... "
		InitializeGitRepositoryCommand.new(project_folder).execute
		puts "āœ…"

		puts "\nProject #{project_name} successfully bootstraped ! šŸŽ‰"
	rescue  => e
		puts "\n\nšŸšØ Failed with error:"
		puts e.message
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
swift_lib_templater-1.0.1 lib/swift_lib_templater.rb