From 96ab8cb83eccb7169bf3ac32524228c84e848b20 Mon Sep 17 00:00:00 2001 From: Jacob Eggers Date: Wed, 8 Jan 2014 17:37:59 -0800 Subject: [PATCH] Fixes based on comments by @jedmao --- script-base.js | 4 ++-- templates/common/_bower.json | 7 ++++--- templates/typescript/app.ts | 10 +++++----- templates/typescript/spec/controller.ts | 6 +++--- templates/typescript/spec/directive.ts | 6 +++--- templates/typescript/spec/filter.ts | 6 +++--- templates/typescript/spec/service.ts | 6 +++--- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/script-base.js b/script-base.js index 4fdc960b6..7c1d3dbcc 100644 --- a/script-base.js +++ b/script-base.js @@ -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; diff --git a/templates/common/_bower.json b/templates/common/_bower.json index 40181eabc..7d6a990a9 100644 --- a/templates/common/_bower.json +++ b/templates/common/_bower.json @@ -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) { %>, @@ -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"<% } %> } } diff --git a/templates/typescript/app.ts b/templates/typescript/app.ts index d2641ba14..63f0ba337 100644 --- a/templates/typescript/app.ts +++ b/templates/typescript/app.ts @@ -1,8 +1,8 @@ -/// -<% if (ngRoute) { %>/// <% } %> -/// -/// -/// +/// +<% if (ngRoute) { %>/// <% } %> +/// +/// +/// 'use strict'; diff --git a/templates/typescript/spec/controller.ts b/templates/typescript/spec/controller.ts index 19e75f95d..018efe16d 100644 --- a/templates/typescript/spec/controller.ts +++ b/templates/typescript/spec/controller.ts @@ -1,6 +1,6 @@ -/// -/// -/// +/// +/// +/// /// diff --git a/templates/typescript/spec/directive.ts b/templates/typescript/spec/directive.ts index f0655a2d9..79fff350f 100644 --- a/templates/typescript/spec/directive.ts +++ b/templates/typescript/spec/directive.ts @@ -1,6 +1,6 @@ -/// -/// -/// +/// +/// +/// /// diff --git a/templates/typescript/spec/filter.ts b/templates/typescript/spec/filter.ts index 4960806ab..ac276b595 100644 --- a/templates/typescript/spec/filter.ts +++ b/templates/typescript/spec/filter.ts @@ -1,6 +1,6 @@ -/// -/// -/// +/// +/// +/// /// diff --git a/templates/typescript/spec/service.ts b/templates/typescript/spec/service.ts index 4a20a4643..664d73add 100644 --- a/templates/typescript/spec/service.ts +++ b/templates/typescript/spec/service.ts @@ -1,6 +1,6 @@ -/// -/// -/// +/// +/// +/// ///