Skip to content

Commit 3244cbd

Browse files
committed
chore(client:ts): remove typings, use @types
1 parent e086072 commit 3244cbd

File tree

6 files changed

+45
-67
lines changed

6 files changed

+45
-67
lines changed

Diff for: templates/app/_package.json

+17-5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@
6565
"@angular/platform-browser-dynamic": "~2.4.9",
6666
"@angular/router": "^3.4.7",
6767
"@angularclass/hmr": "^1.2.1",
68+
<%_ if(filters.ts) { -%>
69+
"@types/core-js": "^0.9.41",
70+
<%_ if(filters.jasmine) { -%>
71+
"@types/jasmine": "^2.5.47",
72+
<%_ } -%>
73+
"@types/lodash": "^4.14.63",
74+
<%_ if(filters.mocha) { -%>
75+
"@types/mocha": "^2.2.41",
76+
"@types/chai": "^3.5.2",
77+
"@types/sinon": "^2.1.3",
78+
"@types/sinon-chai": "^2.7.27",
79+
<%_ } -%>
80+
"@types/node": "^7.0.14",
81+
"@types/selenium-webdriver": "^3.0.3",
82+
"@types/webpack": "^2.2.15",
83+
<%_ } -%>
6884
"angular2-universal": "2.1.0-rc.1",
6985
"angular2-jwt": "^0.1.24",
7086
<% if(filters.auth) { %>
@@ -195,18 +211,14 @@
195211
"proxyquire": "^1.0.1",
196212
"strip-ansi": "^3.0.1",
197213
"supertest": "^1.1.0"<% if(filters.ts) { %>,
198-
"tslint": "^3.5.0",
199-
"typings": "^0.8.1"<% } %>
214+
"tslint": "^3.5.0"<% } %>
200215
},
201216
"engines": {
202217
"node": "^6.2.2",
203218
"npm": "^3.9.5"
204219
},
205220
"scripts": {
206221
"test": "gulp test",
207-
<%_ if(filters.ts) { -%>
208-
"postinstall": "./node_modules/.bin/typings install",
209-
<%_ } -%>
210222
<%_ if(filters.flow) { -%>
211223
"flow": "flow",
212224
<%_ } -%>

Diff for: templates/app/gulpfile.babel.js

+4-15
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ const paths = {
3030
images: `${clientPath}/assets/images/**/*`,
3131
revManifest: `${clientPath}/assets/rev-manifest.json`,
3232
scripts: [
33-
`${clientPath}/**/!(*.spec|*.mock).<%= scriptExt %>`<% if(filters.ts) { %>,
34-
`!${clientPath}/{typings,test_typings}/**/*`<% } %>
33+
`${clientPath}/**/!(*.spec|*.mock).<%= scriptExt %>`
3534
],
3635
styles: [`${clientPath}/{app,components}/**/*.<%= styleExt %>`],
3736
mainStyle: `${clientPath}/app/app.<%= styleExt %>`,
@@ -241,13 +240,6 @@ function webpackCompile(options, cb) {
241240
gulp.task('webpack:dev', cb => webpackCompile({ DEV: true }, cb));
242241
gulp.task('webpack:dist', cb => webpackCompile({ BUILD: true }, cb));
243242
gulp.task('webpack:test', cb => webpackCompile({ TEST: true }, cb));
244-
<%_ if(filters.ts) { -%>
245-
246-
// Install DefinitelyTyped TypeScript definition files
247-
gulp.task('typings', () => {
248-
return gulp.src("./typings.json")
249-
.pipe(plugins.typings());
250-
});<% } %>
251243

252244
gulp.task('styles', () => {
253245
<%_ if(!filters.css) { _%>
@@ -352,8 +344,7 @@ gulp.task('serve', cb => {
352344
'lint:scripts',
353345
'inject',
354346
'copy:fonts:dev',
355-
'env:all'<% if(filters.ts) { %>,
356-
'typings'<% } %>
347+
'env:all'
357348
],
358349
// 'webpack:dev',
359350
['start:server', 'start:client'],
@@ -369,8 +360,7 @@ gulp.task('serve:debug', cb => {
369360
'lint:scripts',
370361
'inject',
371362
'copy:fonts:dev',
372-
'env:all'<% if(filters.ts) { %>,
373-
'typings'<% } %>
363+
'env:all'
374364
],
375365
'webpack:dev',
376366
'start:inspector',
@@ -481,8 +471,7 @@ gulp.task('build', cb => {
481471
'inject',
482472
'transpile:server',
483473
[
484-
'build:images'<% if(filters.ts) { %>,
485-
'typings'<% } %>
474+
'build:images'
486475
],
487476
[
488477
'copy:extras',

Diff for: templates/app/tsconfig(ts).json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"allowJs": true,
4+
"allowSyntheticDefaultImports": true,
5+
"experimentalDecorators": true,
6+
"sourceMap": true,
7+
"rootDir": "./client",
8+
"module": "es6",
9+
"outDir": ".tmp",
10+
"removeComments": false,
11+
"target": "ES5"
12+
},
13+
"exclude": [
14+
"node_modules"
15+
],
16+
"filesGlob": [
17+
"client/{app,components}/**/!(*.spec).ts"
18+
],
19+
"awesomeTypescriptLoaderOptions": {
20+
"resolveGlobs": true,
21+
"forkChecker": true
22+
}
23+
}

Diff for: templates/app/tsconfig.client(ts).json

-24
This file was deleted.

Diff for: templates/app/typings(ts).json

-22
This file was deleted.

Diff for: templates/app/webpack.make.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ module.exports = function makeWebpackConfig(options) {
134134
loader: 'awesome-typescript-loader',
135135
<%_ if(filters.ts) { -%>
136136
options: {
137-
tsconfig: path.resolve(__dirname, 'tsconfig.client.json')
137+
tsconfig: path.resolve(__dirname, 'tsconfig.json')
138138
},<% } %>
139139
}].concat(DEV ? '@angularclass/hmr-loader' : []),
140140
include: [

0 commit comments

Comments
 (0)