Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/script-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,22 @@ var MyBase = module.exports = generators.NamedBase.extend({

var fileType = this._getFileType('language'),
templateSrc = fileType + '/' + options['type'] + '.' + fileType,
testSrc = /*fileType +*/ 'js/spec/' + options['type'] + '.js',
testSrc = fileType + '/spec/' + options['type'] + '.' + fileType,
templateData = {
scriptAppName: this.appname,
scriptClassName: camelCase(this.name),
serviceValue : (typeof this.options['service-value'] !== 'undefined') ? this.options['service-value'] : ''
},
fullPath = 'src/index.html',
templateDest = this._makeDestination(options['type']), // Create the destination path
testDest = 'src/' + this._makeDestination(options['type'], true) + '.spec.js', // + fileType,
typedTemplateDest = 'src/' + templateDest + '.' + fileType; // Add to the destination path the file type
testDest = this._makeDestination(options['type'], true), // + fileType,
typedTemplateDest = 'src/' + templateDest + '.' + fileType, // Add to the destination path the file type
typedTestDest = 'src/' + testDest + '.' + fileType;

this.template(templateSrc, typedTemplateDest, templateData); // Create file
//console.log(this.options['skip-test']);
if ((typeof options['skipTest'] === 'undefined' || !options['skipTest']) && !this.options['skip-test']) {
this.template(testSrc, testDest, templateData); // Create test
this.template(testSrc, typedTestDest, templateData); // Create test
}
},
// Add styles
Expand Down