Skip to content

Commit

Permalink
Fixes based on comments by @jedmao
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Eggers committed Jan 9, 2014
1 parent 3041dd5 commit 96ab8cb
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions script-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ var Generator = module.exports = function Generator() {
if (typeof this.env.options.typescript === 'undefined') {
this.option('typescript');

// attempt to detect if user is using CS or not
// if cml arg provided, use that; else look for the existence of cs
// attempt to detect if user is using TS or not
// if cml arg provided, use that; else look for the existence of ts
if (!this.options.typescript &&
this.expandFiles(path.join(this.env.options.appPath, '/scripts/**/*.ts'), {}).length > 0) {
this.options.typescript = true;
Expand Down
7 changes: 4 additions & 3 deletions templates/common/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"dependencies": {
"angular": "1.2.6",
"json3": "~3.2.6",
"es5-shim": "~2.1.0"<% if (typescript) { %>,
"definitivelyTyped": "https://github.com/borisyankov/DefinitelyTyped.git"<% } %><% if (bootstrap) { %>,
"es5-shim": "~2.1.0"<% if (bootstrap) { %>,
"jquery": "~1.10.2"<% if (compassBootstrap) { %>,
"sass-bootstrap": "~3.0.2"<% } else { %>,
"bootstrap": "~3.0.3"<% } } %><% if (resourceModule) { %>,
Expand All @@ -16,6 +15,8 @@
},
"devDependencies": {
"angular-mocks": "1.2.6",
"angular-scenario": "1.2.6"
"angular-scenario": "1.2.6"<% if (typescript) { %>,
"dt-jasmine": "~2.0.0",
"dt-angular": "https://github.com/jedmao/dt-angular/archive/v1.2.0.tar.gz"<% } %>
}
}
10 changes: 5 additions & 5 deletions templates/typescript/app.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// <reference path="../bower_components/definitivelyTyped/angularjs/angular.d.ts" />
<% if (ngRoute) { %>/// <reference path="../bower_components/definitivelyTyped/angularjs/angular-route.d.ts" /><% } %>
/// <reference path="../bower_components/definitivelyTyped/angularjs/angular-resource.d.ts" />
/// <reference path="../bower_components/definitivelyTyped/angularjs/angular-sanitize.d.ts" />
/// <reference path="../bower_components/definitivelyTyped/angularjs/angular-resource.d.ts" />
/// <reference path="../bower_components/dt-angular/angular.d.ts" />
<% if (ngRoute) { %>/// <reference path="../bower_components/dt-angular/angular-route.d.ts" /><% } %>
/// <reference path="../bower_components/dt-angular/angular-resource.d.ts" />
/// <reference path="../bower_components/dt-angular/angular-sanitize.d.ts" />
/// <reference path="../bower_components/dt-angular/angular-resource.d.ts" />

'use strict';

Expand Down
6 changes: 3 additions & 3 deletions templates/typescript/spec/controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/jasmine/jasmine.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/dt-jasmine/jasmine.d.ts" />

/// <reference path="../../../app/scripts/controllers/<%= cameledName.toLowerCase() %>.ts" />

Expand Down
6 changes: 3 additions & 3 deletions templates/typescript/spec/directive.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/jasmine/jasmine.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/dt-jasmine/jasmine.d.ts" />

/// <reference path="../../../app/scripts/directives/<%= cameledName.toLowerCase() %>.ts" />

Expand Down
6 changes: 3 additions & 3 deletions templates/typescript/spec/filter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/jasmine/jasmine.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/dt-jasmine/jasmine.d.ts" />

/// <reference path="../../../app/scripts/filters/<%= cameledName.toLowerCase() %>.ts" />

Expand Down
6 changes: 3 additions & 3 deletions templates/typescript/spec/service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/angularjs/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/DefinitivelyTyped/jasmine/jasmine.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular.d.ts" />
/// <reference path="../../../app/bower_components/dt-angular/angular-mocks.d.ts" />
/// <reference path="../../../app/bower_components/dt-jasmine/jasmine.d.ts" />

/// <reference path="../../../app/scripts/services/<%= cameledName.toLowerCase() %>.ts" />

Expand Down

0 comments on commit 96ab8cb

Please sign in to comment.