diff --git a/docs/how-it-works.md b/docs/how-it-works.md
index 1eac08cb..fd0472ee 100644
--- a/docs/how-it-works.md
+++ b/docs/how-it-works.md
@@ -64,9 +64,10 @@ This task will launch the CoffeeLint analyze and the Coffee compilation and put
### With TypeScript
-The `scripts` task has a dependency which is the installation of typings with the `tsd:install` gulp task. Once the typings ready, TSLint, TypeScript compilation and finally a concatenation of all JavaScript files produced in the right order are done.
+The `scripts` task has a dependency which is the installation of typings with the `typings:install` gulp task. Once the typings ready, TSLint, TypeScript compilation and finally a concatenation of all JavaScript files produced in the right order are done.
-`tsd:install` is located in the `gulp/tsd.js` which is created only when choosing TypeScript. It will automatically download typings files for the dependency found in Bower with a popular library [TSD](http://definitelytyped.org/tsd/)
+`typings:install` is located in the `gulp/typings.js` which is created only when choosing TypeScript. It will automatically download typings files for the
+dependency found in Bower with a popular library [Typings](https://github.com/typings/typings)
### With ES6
diff --git a/generators/app/files.json b/generators/app/files.json
index a8b21d94..90471df9 100644
--- a/generators/app/files.json
+++ b/generators/app/files.json
@@ -22,7 +22,7 @@
"package.json",
"bower.json",
- "tsd.json",
+ "typings.json",
"karma.conf.js",
diff --git a/generators/app/src/preprocessors.js b/generators/app/src/preprocessors.js
index d9550473..59939866 100644
--- a/generators/app/src/preprocessors.js
+++ b/generators/app/src/preprocessors.js
@@ -60,7 +60,7 @@ module.exports = function (GulpAngularGenerator) {
}
if (this.props.jsPreprocessor.key !== 'typescript') {
- rejectWithRegexp.call(this, /tsd\.json/);
+ rejectWithRegexp.call(this, /typings\.json/);
rejectWithRegexp.call(this, /tsconfig\.json/);
}
@@ -108,8 +108,8 @@ module.exports = function (GulpAngularGenerator) {
if (this.props.jsPreprocessor.key === 'typescript') {
this.files.push({
- src: '.tsdrc',
- dest: '.tsdrc',
+ src: '.typingsrc',
+ dest: '.typingsrc',
template: false
});
}
diff --git a/generators/app/src/write.js b/generators/app/src/write.js
index 12d50a64..152bde93 100644
--- a/generators/app/src/write.js
+++ b/generators/app/src/write.js
@@ -43,7 +43,7 @@ module.exports = function (GulpAngularGenerator) {
});
if (this.props.jsPreprocessor.key === 'typescript') {
- this.spawnCommandSync('tsd', ['install', '-so']);
+ this.spawnCommandSync('typings', ['install', '-s']);
}
};
diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json
index 4d41eb0c..a8f9b055 100644
--- a/generators/app/templates/_package.json
+++ b/generators/app/templates/_package.json
@@ -59,9 +59,9 @@
"traceur-loader": "~0.6.3",
<% } if (props.jsPreprocessor.key === 'typescript') { -%>
"typescript": "~1.6.2",
- "awesome-typescript-loader": "~0.14.0",
+ "ts-loader": "~0.8.0",
"tslint-loader": "~1.0.2",
- "tsd": "~0.6.5",
+ "typings": "~0.6.6",
<% } else if (props.jsPreprocessor.srcExtension !== 'es6') { -%>
"gulp-angular-filesort": "~1.1.1",
<% } if (props.htmlPreprocessor.key !== 'noHtmlPrepro') { -%>
diff --git a/generators/app/templates/_tsd.json b/generators/app/templates/_typings.json
similarity index 98%
rename from generators/app/templates/_tsd.json
rename to generators/app/templates/_typings.json
index bc33db1c..42ffbc6c 100644
--- a/generators/app/templates/_tsd.json
+++ b/generators/app/templates/_typings.json
@@ -3,7 +3,7 @@
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "<%- props.paths.tmp %>/typings",
- "bundle": "<%- props.paths.tmp %>/typings/tsd.d.ts",
+ "bundle": "<%- props.paths.tmp %>/typings/main.d.ts",
"installed": {
<% if (angularModulesObject.animate) { -%>
"angularjs/angular-animate.d.ts": {
diff --git a/generators/app/templates/gulp/_scripts.js b/generators/app/templates/gulp/_scripts.js
index 5cff6011..62e08a7b 100644
--- a/generators/app/templates/gulp/_scripts.js
+++ b/generators/app/templates/gulp/_scripts.js
@@ -57,7 +57,7 @@ function webpackWrapper(watch, test, callback) {
<% } if (props.jsPreprocessor.key === 'traceur') { -%>
loaders: [{ test: /\.js$/, exclude: /node_modules/, loaders: ['ng-annotate', 'traceur-loader']}]
<% } if (props.jsPreprocessor.key === 'typescript') { -%>
- loaders: [{ test: /\.ts$/, exclude: /node_modules/, loaders: ['ng-annotate', 'awesome-typescript-loader']}]
+ loaders: [{ test: /\.ts$/, exclude: /node_modules/, loaders: ['ng-annotate', 'ts-loader']}]
<% } -%>
},
output: { filename: 'index.module.js' }
diff --git a/generators/app/templates/src/app/_index.module.ts b/generators/app/templates/src/app/_index.module.ts
index 7050e93f..a0799d89 100644
--- a/generators/app/templates/src/app/_index.module.ts
+++ b/generators/app/templates/src/app/_index.module.ts
@@ -1,4 +1,4 @@
-///
+///
import { config } from './index.config';
<% if (props.router.key === 'new-router') { -%>
diff --git a/test/node/test-preprocessors.js b/test/node/test-preprocessors.js
index e5239cae..34719672 100644
--- a/test/node/test-preprocessors.js
+++ b/test/node/test-preprocessors.js
@@ -24,7 +24,7 @@ describe('gulp-angular generator preprocessors script', function () {
{ src: 'gulp/scripts.js' },
{ src: 'gulp/markups.js' },
{ src: 'index.constants.js' },
- { src: 'tsd.json' }
+ { src: 'typings.json' }
];
});
@@ -128,7 +128,7 @@ describe('gulp-angular generator preprocessors script', function () {
generator.props = { jsPreprocessor: { key: 'typescript' } };
generator.travisCopies();
generator.files.length.should.be.equal(6);
- generator.files[5].src.should.match(/tsdrc/);
+ generator.files[5].src.should.match(/typingsrc/);
});
});
diff --git a/test/node/test-writes.js b/test/node/test-writes.js
index e7d2cd4e..bdaf6502 100644
--- a/test/node/test-writes.js
+++ b/test/node/test-writes.js
@@ -114,7 +114,7 @@ describe('gulp-angular generator writes script', function () {
});
});
- it('should call TSD install with Typescript preprocessor', function () {
+ it('should call Typings install with Typescript preprocessor', function () {
generator.options = {
'skip-install': false,
'skip-message': false
@@ -126,7 +126,7 @@ describe('gulp-angular generator writes script', function () {
};
generator.spawnCommandSync = sinon.stub();
generator.install();
- generator.spawnCommandSync.should.have.been.calledWith('tsd', ['install', '-so']);
+ generator.spawnCommandSync.should.have.been.calledWith('typings', ['install', '-s']);
});
});
diff --git a/test/npm-shrinkwrap.json b/test/npm-shrinkwrap.json
index 9f5dff24..8429524f 100644
--- a/test/npm-shrinkwrap.json
+++ b/test/npm-shrinkwrap.json
@@ -270,10 +270,10 @@
"from": "autoprefixer@>=6.0.0 <7.0.0",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.0.3.tgz"
},
- "awesome-typescript-loader": {
- "version": "0.14.0",
- "from": "awesome-typescript-loader@>=0.14.0 <0.15.0",
- "resolved": "https://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-0.14.0.tgz"
+ "ts-loader": {
+ "version": "0.8.0",
+ "from": "ts-loader@>=0.8.0 <0.9.0",
+ "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-0.8.0.tgz"
},
"aws-sign2": {
"version": "0.6.0",
@@ -6121,10 +6121,10 @@
"from": "tryor@>=0.1.2 <0.2.0",
"resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz"
},
- "tsd": {
- "version": "0.6.5",
- "from": "tsd@>=0.6.5 <0.7.0",
- "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.6.5.tgz",
+ "typings": {
+ "version": "0.6.6",
+ "from": "typings@>=0.6.6 <0.7.0",
+ "resolved": "https://registry.npmjs.org/typings/-/typings-0.6.6.tgz",
"dependencies": {
"bl": {
"version": "0.9.4",
diff --git a/test/template/test-scripts.js b/test/template/test-scripts.js
index 83356b29..f876deae 100644
--- a/test/template/test-scripts.js
+++ b/test/template/test-scripts.js
@@ -45,7 +45,7 @@ describe('gulp-angular scripts template', function () {
model.props.jsPreprocessor.extension = 'ts';
result = scripts(model);
result.should.match(/function webpackWrapper\(watch, test, callback\)/);
- result.should.match(/loaders:.*loaders: \['ng-annotate', 'awesome-typescript-loader'/);
+ result.should.match(/loaders:.*loaders: \['ng-annotate', 'ts-loader'/);
result.should.match(/gulp\.task\('scripts:watch'/);
result.should.not.match(/babel/);
result.should.not.match(/traceur/);
diff --git a/test/template/test-tsd.js b/test/template/test-tsd.js
index 3635612d..bfa06ded 100644
--- a/test/template/test-tsd.js
+++ b/test/template/test-tsd.js
@@ -8,14 +8,14 @@ chai.use(sinonChai);
var templateTools = require('../template-tools');
var mockModel = require('./mock-model');
-describe('gulp-angular tsd template', function () {
- var tsd;
+describe('gulp-angular typings template', function () {
+ var typings;
var model;
before(function () {
- return templateTools.load('_tsd.json')
+ return templateTools.load('_typings.json')
.then(function (templateModule) {
- tsd = templateModule;
+ typings = templateModule;
});
});
@@ -25,14 +25,14 @@ describe('gulp-angular tsd template', function () {
it('should insert tmp directory', function () {
model.props.paths.tmp = 'test/tmp/dir';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/"path": "test\/tmp\/dir/);
result.should.match(/"bundle": "test\/tmp\/dir/);
});
it('should insert default definitions', function () {
model.props.paths.tmp = 'test/tmp/dir';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/angularjs\/angular.d.ts/);
result.should.match(/angularjs\/angular-mocks.d.ts/);
result.should.match(/jasmine\/jasmine.d.ts/);
@@ -46,7 +46,7 @@ describe('gulp-angular tsd template', function () {
cookies: true,
sanitize: true
};
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/angularjs\/angular-animate.d.ts/);
result.should.match(/angularjs\/angular-cookies.d.ts/);
result.should.match(/angularjs\/angular-sanitize.d.ts/);
@@ -54,63 +54,63 @@ describe('gulp-angular tsd template', function () {
it('should insert jQuery definition', function () {
model.props.jQuery.key = 'jquery2';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/jquery\/jquery.d.ts/);
});
it('should insert Zepto definition', function () {
model.props.jQuery.key = 'zepto';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/zepto\/zepto.d.ts/);
});
it('should insert ngResource definition', function () {
model.props.resource.key = 'angular-resource';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/angularjs\/angular-resource.d.ts/);
});
it('should insert Restangular definition', function () {
model.props.resource.key = 'restangular';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/restangular\/restangular.d.ts/);
});
it('should insert UI-Router definition', function () {
model.props.router.key = 'ui-router';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/angular-ui-router\/angular-ui-router.d.ts/);
});
it('should insert ngRoute definition', function () {
model.props.router.key = 'angular-route';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/angularjs\/angular-route.d.ts/);
});
it('should insert Bootstrap definition', function () {
model.props.ui.key = 'bootstrap';
model.props.bootstrapComponents = 'official';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/bootstrap\/bootstrap.d.ts/);
});
it('should insert Foundation definition', function () {
model.props.ui.key = 'foundation';
model.props.foundationComponents = 'official';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/foundation\/foundation.d.ts/);
});
it('should insert Angular-Mateiral definition', function () {
model.props.ui.key = 'angular-material';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/angular-material\/angular-material.d.ts/);
});
it('should insert UI-Bootstrap definition', function () {
model.props.ui.key = 'angular-material';
- var result = tsd(model);
+ var result = typings(model);
result.should.match(/angular-ui-bootstrap\/angular-ui-bootstrap.d.ts/);
});
});