forked from OmniSharp/generator-aspnet
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript-base.js
More file actions
21 lines (18 loc) · 807 Bytes
/
Copy pathscript-base.js
File metadata and controls
21 lines (18 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'use strict';
var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');
var NamedGenerator = module.exports = function NamedGenerator() {
yeoman.generators.NamedBase.apply(this, arguments);
this.sourceRoot(path.join(__dirname, './templates/'));
};
util.inherits(NamedGenerator, yeoman.generators.NamedBase);
NamedGenerator.prototype.generateTemplateFile = function(templateFile, targetFile, templateData) {
this.log('You called the aspnet subgenerator with the arg ' + this.name);
if (templateData !== null) {
this.fs.copyTpl(this.templatePath(templateFile), this.destinationPath(targetFile), templateData);
} else {
this.fs.copyTpl(this.templatePath(templateFile), this.destinationPath(targetFile));
}
this.log(targetFile + ' created.');
};