From 80186c144fae14aa88dc45f6d7f8c4370e4ba025 Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Tue, 18 Oct 2016 17:52:34 -0700 Subject: [PATCH] chore: rename tsconfigs for IDEs (#1524) --- src/lib/{tsconfig-spec.json => tsconfig-srcs.json} | 12 ++++++------ src/lib/tsconfig.json | 12 ++++++------ tools/gulp/task_helpers.ts | 6 +++--- tools/gulp/tasks/components.ts | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) rename src/lib/{tsconfig-spec.json => tsconfig-srcs.json} (81%) diff --git a/src/lib/tsconfig-spec.json b/src/lib/tsconfig-srcs.json similarity index 81% rename from src/lib/tsconfig-spec.json rename to src/lib/tsconfig-srcs.json index 616568e24c7..126d417299d 100644 --- a/src/lib/tsconfig-spec.json +++ b/src/lib/tsconfig-srcs.json @@ -5,7 +5,7 @@ "experimentalDecorators": true, "lib": ["es6", "es2015", "dom"], "mapRoot": "", - "module": "commonjs", + "module": "es2015", "moduleResolution": "node", "noEmitOnError": true, "noImplicitAny": true, @@ -15,18 +15,18 @@ "target": "es5", "inlineSources": true, "stripInternal": true, - "baseUrl": "", - "paths": { - }, "typeRoots": [ "../../node_modules/@types" ], "types": [ - "jasmine" ] }, + "exclude": [ + "**/*.spec.*", + "system-config-spec.ts" + ], "angularCompilerOptions": { - "genDir": "../../dist", + "genDir": "../../dist/@angular/material", "skipTemplateCodegen": true, "debug": true } diff --git a/src/lib/tsconfig.json b/src/lib/tsconfig.json index 126d417299d..616568e24c7 100644 --- a/src/lib/tsconfig.json +++ b/src/lib/tsconfig.json @@ -5,7 +5,7 @@ "experimentalDecorators": true, "lib": ["es6", "es2015", "dom"], "mapRoot": "", - "module": "es2015", + "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, "noImplicitAny": true, @@ -15,18 +15,18 @@ "target": "es5", "inlineSources": true, "stripInternal": true, + "baseUrl": "", + "paths": { + }, "typeRoots": [ "../../node_modules/@types" ], "types": [ + "jasmine" ] }, - "exclude": [ - "**/*.spec.*", - "system-config-spec.ts" - ], "angularCompilerOptions": { - "genDir": "../../dist/@angular/material", + "genDir": "../../dist", "skipTemplateCodegen": true, "debug": true } diff --git a/tools/gulp/task_helpers.ts b/tools/gulp/task_helpers.ts index 74d4a4b6afb..9d42388bb85 100644 --- a/tools/gulp/task_helpers.ts +++ b/tools/gulp/task_helpers.ts @@ -34,11 +34,11 @@ function _globify(maybeGlob: string, suffix = '**/*') { /** Create a TS Build Task, based on the options. */ -export function tsBuildTask(tsConfigPath: string) { +export function tsBuildTask(tsConfigPath: string, tsConfigName = 'tsconfig.json') { let tsConfigDir = tsConfigPath; - if (fs.existsSync(path.join(tsConfigDir, 'tsconfig.json'))) { + if (fs.existsSync(path.join(tsConfigDir, tsConfigName))) { // Append tsconfig.json - tsConfigPath = path.join(tsConfigDir, 'tsconfig.json'); + tsConfigPath = path.join(tsConfigDir, tsConfigName); } else { tsConfigDir = path.dirname(tsConfigDir); } diff --git a/tools/gulp/tasks/components.ts b/tools/gulp/tasks/components.ts index ce8da967d33..cd06cc9b91c 100644 --- a/tools/gulp/tasks/components.ts +++ b/tools/gulp/tasks/components.ts @@ -40,10 +40,10 @@ task(':watch:components:spec', () => { /** Builds component typescript only (ESM output). */ -task(':build:components:ts', tsBuildTask(componentsDir)); +task(':build:components:ts', tsBuildTask(componentsDir, 'tsconfig-srcs.json')); /** Builds components typescript for tests (CJS output). */ -task(':build:components:spec', tsBuildTask(path.join(componentsDir, 'tsconfig-spec.json'))); +task(':build:components:spec', tsBuildTask(componentsDir)); /** Copies assets (html, markdown) to build output. */ task(':build:components:assets', copyTask([