build: tsconfig for editor warnings (#3791)

* build: tsconfig for editor warnings

Currently when using a code editor that uses the TypeScript language service (Webstorm / VS Code / Atom / Sublime) there will be TypeScript errors in the `.spec` files.

This is because the editor finds the `tsconfig.json` file that doesn't match the spec files. Therefore it complains about the `experimentalDecorators`.

In `angular/angular` there is a global `tsconfig` file that matches everything and is therefore fixing the editor warnings. This file is also used to compile all `.spec` files for the whole project.

We can add such a `tsconfig.json` file as well, and in the future we can use it for compiling the specs as well.

* Add docs for tsconfig files
This commit is contained in:
Paul Gschwendtner
2017-03-29 20:13:33 +02:00
committed by tinayuangao
parent 51cfb5f75f
commit becb7a87e0
11 changed files with 36 additions and 6 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ task(':watch:devapp', () => {
});
/** Path to the demo-app tsconfig file. */
const tsconfigPath = join(appDir, 'tsconfig.json');
const tsconfigPath = join(appDir, 'tsconfig-build.json');
task(':build:devapp:ts', tsBuildTask(tsconfigPath));
task(':build:devapp:scss', sassBuildTask(outDir, appDir));
+1 -1
View File
@@ -13,7 +13,7 @@ const appDir = path.join(SOURCE_ROOT, 'e2e-app');
const outDir = DIST_E2EAPP;
const PROTRACTOR_CONFIG_PATH = path.join(PROJECT_ROOT, 'test/protractor.conf.js');
const tsconfigPath = path.join(appDir, 'tsconfig.json');
const tsconfigPath = path.join(appDir, 'tsconfig-build.json');
task(':watch:e2eapp', () => {
watch(path.join(appDir, '**/*.ts'), [':build:e2eapp:ts']);
+1 -1
View File
@@ -13,7 +13,7 @@ const inlineResources = require('../../../scripts/release/inline-resources');
const uglify = require('uglify-js');
const libraryRoot = join(SOURCE_ROOT, 'lib');
const tsconfigPath = join(libraryRoot, 'tsconfig.json');
const tsconfigPath = join(libraryRoot, 'tsconfig-build.json');
// Paths to the different output directories.
const materialDir = DIST_MATERIAL;
+2
View File
@@ -1,3 +1,5 @@
// TypeScript config file that will be used to compile the gulp tasks. The normal gulpfile will
// use TS-Node to compile the gulp tasks at runtime.
{
"compilerOptions": {
"experimentalDecorators": true,