// GitHub Gist Sub-Generator
// =========================
//
// Usage: `$ yo realguess:gist 'mygist'
//
// TODO
// ----
//
// 1. The current sub-generator only supports JavaScript Gist (see templates).
//    Need to expand it to support other languages.
//
// > (c) 2014 Chao Huang <chao@realguess.net>

'use strict';

var yeoman = require('yeoman-generator');
var util   = require('util');

// Define generator prototype.
function GistGenerator(args, options, config) {
  yeoman.generators.NamedBase.apply(this, arguments);
}
module.exports = GistGenerator;
util.inherits(GistGenerator, yeoman.generators.NamedBase);

// Generator Gist files.
GistGenerator.prototype.files = function files() {
  this.template('gist.js', this.name + '.js');
};

@@ -93,16 +93,17 @@
 'mygist'
+%60
 %0A//%0A// T
@@ -321,165 +321,63 @@
 var 
-yeoman = require('yeoman-generator');%0Avar util   = require('util');%0A%0A// Define generator prototype.%0Afunction GistGenerator(args, options, config) %7B%0A  
+util   = require('util');%0Avar yeoman = require('
 yeoman
-.
+-
 gene
@@ -385,92 +385,17 @@
 ator
-s.NamedBase.apply(this, arguments);%0A%7D%0Amodule.exports = GistGenerator;%0Autil.inherits(
+');%0A%0Avar 
 Gist
@@ -403,17 +403,18 @@
 enerator
-,
+ =
  yeoman.
@@ -437,68 +437,26 @@
 Base
-);%0A%0A// Generator Gist files.%0AGistGenerator.prototype.files =
+.extend(%7B%0A  files:
  fun
@@ -471,16 +471,18 @@
 les() %7B%0A
+  
   this.t
@@ -524,7 +524,45 @@
 ');%0A
-%7D
+  %7D,%0A%7D);%0Amodule.exports = GistGenerator
 ;%0A

Update template to use latest structure