A CLI tool to create new projects from templates.
gem install mk.rbmk <template_name> <project_name>This will:
- Copy the template to
./<project_name> - Replace
ExampleGemwith your project's constant name (e.g.,MyProject) - Replace
examplegemwith your project name (e.g.,my_project) - Rename any files containing these placeholders
mk ruby my_awesome_gemCreates a new directory my_awesome_gem from the ruby template with all placeholders replaced.
Templates are searched in this order:
~/templates/<template_name>- Your local templates (takes priority)- Bundled templates included with the gem
To override a bundled template, create one with the same name in ~/templates/.
Templates are regular directories containing your project boilerplate. Use these placeholders:
ExampleGem- Replaced with the constant name (e.g.,MyAwesomeGem)examplegem- Replaced with the project name (e.g.,my_awesome_gem)
Placeholders work in both file contents and file/directory names.
mk ruby my_gemTemplate file ~/templates/ruby/lib/examplegem.rb:
class ExampleGem
VERSION = "0.1.0"
endOutput file my_gem/lib/my_gem.rb:
class MyGem
VERSION = "0.1.0"
endBug reports and pull requests are welcome on GitHub.
After checking out the repo:
bin/setup
bundle exec rake testGenerate documentation:
bundle exec yard doc
bundle exec yard server # Browse at http://localhost:8808The gem is available as open source under the terms of the MIT License.