First, generate an empty generator app and make and test your changes there. Then copy the changes you made in the src/ folder of your app to generators/app/src/ folder of the generator.
See #249 for an example.
To try out the generator with your change follow the yo from a local generator
instructions.