Contributing - T4MVC/T4MVC GitHub Wiki

How to contribute to T4MVC

Here is a basic guide on what you need to do to contribute changes to T4MVC.

Basic description of the T4MVC solution

The T4MVC solution contains two projects: T4MVCHostMvcApp and T4MVCHostMvcApp.Tests.

  • T4MVCHostMvcApp is essentially a harness project for T4MVC to execute in. It has the structure of an MVC application, but it is not meant to be run as such. Instead, its purpose is to exercise many of T4MVC's features, so that the T4 template will generate all kind of interesting code.
  • T4MVCHostMvcApp.Tests contains unit tests that verify that the right code was generated by the T4MVC template.

To make a change to T4MVC

  • Make your change to T4MVC.tt and/or T4MVC.settings.t4 (they're in the 'T4MVCHostMvcApp\T4MVC Files' folder). Please don't use TAB characters!
  • If necessary, add some files to the T4MVCHostMvcApp project. e.g. you may need a new controller Action or a new static file to make use of the feature
  • Write a new unit test that makes sure things work as they should
  • Run all the unit tests and make sure they all pass
  • Carefully look at the diff in both T4MVC.tt and all the generated file to make sure that you can account for all changes.
  • Briefly describe your change in the readme file in the next folder as T4MVC.tt. This will later go in the History page.

Pushing changes back to GitHub

Just send a pull request with your changes.