Skip to content

Instantly share code, notes, and snippets.

@peterblazejewicz
Created February 2, 2015 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterblazejewicz/9ae54b300b862b4e5320 to your computer and use it in GitHub Desktop.
Save peterblazejewicz/9ae54b300b862b4e5320 to your computer and use it in GitHub Desktop.
diff --git a/app/index.js b/app/index.js
index a440ea3..a5e9ab6 100644
--- a/app/index.js
+++ b/app/index.js
@@ -1,4 +1,5 @@
'use strict';
+var path = require('path');
var yeoman = require('yeoman-generator');
var yosay = require('yosay');
var chalk = require('chalk');
@@ -86,41 +87,25 @@ var AspnetGenerator = yeoman.generators.Base.extend({
}.bind(this));
},
- retrieveContent: function () {
- var done = this.async();
- this.remote('OmniSharp', 'generator-aspnet', 'release', function (err, remote) {
- done();
- }, true);
- },
-
writing: function () {
+ this.sourceRoot(path.join(__dirname, '../samples/'));
this.mkdir(this.applicationName);
switch (this.type) {
case 'console':
- this.directory(this.cacheRoot() + '/OmniSharp/generator-aspnet/release/samples/console', this.applicationName);
- break;
case 'web':
- this.directory(this.cacheRoot() + '/OmniSharp/generator-aspnet/release/samples/web', this.applicationName);
- break;
case 'mvc':
- this.directory(this.cacheRoot() + '/OmniSharp/generator-aspnet/release/samples/mvc', this.applicationName);
- break;
case 'nancy':
- this.directory(this.cacheRoot() + '/OmniSharp/generator-aspnet/release/samples/nancy', this.applicationName);
- break;
case 'classlib':
- this.directory(this.cacheRoot() + '/OmniSharp/generator-aspnet/release/samples/classlib', this.applicationName);
- break;
- case 'unittest':
- this.directory(this.cacheRoot() + '/OmniSharp/generator-aspnet/release/samples/unittest', this.applicationName);
+ case 'unittest':
+ this.directory(this.type, this.applicationName);
break;
default:
this.log('Unknown project type');
}
+
},
end: function () {
- this.log(this.cacheRoot());
if (!this.options['skip-install']) {
this.log('\r\n');
this.log('Your project is now created, you can use the following commands to get going');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment