Files
angular__angular/tsconfig.json
T
Jeremy Elbourn 1cb8907a66 build: create JS bundles for each component (#6998)
Before this change, all of `@angular/material` was bundled into a
single, flat JS file.

After this change, each top-level component (i.e., each directory under
`src/lib`) will be have its own JS file (and d.ts and metadata.json).

The benefit of this change is that current versions of webpack will be
able to do a much better job of only including the code an app is using.

It also allows (but does not require) people to explicitly import from specific components,
e.g.
```
import {MdButtonModule} from '@angular/material/button';
``

For development _within Angular Material itself_ we have to use these
deeper imports because the root `@angular/material` doesn't exist until
we build the relase package.

Additionally, this PR adds a `tsconfig.json` for each dir under `src/`
with the correct path mappings for that directory, so that IDEs will
correctly generate imports.

Closure Compiler CI check is also disabled by this PR; it cannot work
with the new package structure until a release with
https://github.com/google/closure-compiler/pull/2600 is made available.
2017-09-14 15:15:17 -07:00

34 lines
1.2 KiB
JSON

// TypeScript config file that matches all source files in the project. This file is read by
// IDEs and TSLint. For IDEs it ensures that `experimentalDecorator` warnings are not showing up.
{
"compilerOptions": {
"outDir": "./dist/packages/all",
// Needed for Moment.js since it doesn't have a default export.
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"module": "es2015",
"moduleResolution": "node",
"noUnusedParameters": true,
"strictNullChecks": true,
"skipLibCheck": true,
"target": "es2015",
"lib": ["es5", "es2015", "dom"],
"types": ["jasmine"]
},
"include": [
"src/**/*.ts",
"tools/**/*.ts"
],
"exclude": [
// Exclude files that depend on Node APIs because those depend on the Node types and therefore
// cause ambiguous imports. For example `setTimeout()` will return a Timer instead of a number.
"./src/universal-app/prerender.ts",
// IDEs should not type-check the different node_modules directories of the different packages.
// This would cause the IDEs to be slower and also linters would check the node_modules.
"node_modules/",
"tools/dashboard/node_modules/",
"tools/screenshot-test/node_modules/"
]
}