Project

mt_tool

0.0
The project is in a healthy, maintained state
常用工具 -- 快速创建模版代码.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 0.14
~> 3.10
~> 13.0
~> 2.3
~> 3.12

Runtime

~> 3.1
~> 1.1
~> 1.2
~> 0.2
~> 1.2
~> 1.22
 Project Readme

MtTool

A Ruby gem for generating VIPER architecture modules for iOS projects. Supports both Swift and Objective-C.

Module File Generator

Features

  • Generate complete VIPER module structure
  • Support for both Swift and Objective-C
  • Customizable templates
  • Command-line interface
  • Detailed logging for debugging

Installation

Add this line to your application's Gemfile:

gem 'mt_tool'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install mt_tool

Usage

Generating a VIPER Module

# Generate a VIPER module
mt_tool vmod -n ModuleName -a "Author Name" -p ./path/to/module

# Example
mt_tool vmod -n HomeScreen -a "Tom Liu" -p ./Modules

Command Options

  • -n, --name: Module name (required)
  • -a, --author: Author name (required)
  • -p, --path: Target path for generation (required)

Generated Structure

ModuleName/
├── ModuleNameEntity.swift
├── ModuleNameInteractor.swift
├── ModuleNamePresenter.swift
├── ModuleNameRouter.swift
└── ModuleNameViewController.swift

Development

After checking out the repo, run bundle install to install dependencies.

To run the test suite:

bundle exec rake test

To install this gem onto your local machine:

bundle exec rake install

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Add tests for your changes
  4. Make your changes
  5. Run the tests (bundle exec rake test)
  6. Commit your changes (git commit -am 'Add some feature')
  7. Push to the branch (git push origin feature/my-new-feature)
  8. Create new Pull Request

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the MtTool project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.