Commit Graph

289 Commits

Author SHA1 Message Date
Jeremy Elbourn 13d0160c74 build: include typings/index in root metadata export (#7190) 2017-09-28 15:40:44 -07:00
Paul Gschwendtner afa92a8d60 build: copy stylesheets to release output (#7204)
* Copies stylesheets of secondary entry-points to the root of the release output
* Better deduping for the `_theming.scss` file (currently includes multiple `cdk-a11y` mixins)
* Removes unused `cdk-a11y` import in the `button-toggle` component.
* Moves some logic out of the `BuildPackage` class (in favor of readability)
2017-09-28 15:40:16 -07:00
Paul Gschwendtner 1ac3fd25c9 chore: remove screenshot timeout check (#7206)
Removes the screenshot timeout check, which will cancel the screenshot diff if the last action took longer than 6 minutes. Travis CI will automatically cancel the job if there was no console output for 10 minutes.
2017-09-28 15:39:40 -07:00
Kristiyan Kostadinov 3bc9ae9854 build: add placeholder for Angular version (#7303)
Adds the `0.0.0-NG` placeholder that will ensure that all published packages will have the same Angular requirements.
2017-09-28 15:33:13 -07:00
Paul Gschwendtner c54b83ba58 chore: fix validate release task (#7359)
Updates the `gulp validate-release` task to work with the current package structure.
2017-09-28 15:31:55 -07:00
Paul Gschwendtner 40ec11cc49 build: faster demo-app building (#7280)
* The demo-app no longer builds every secondary entry-point separately. Now the everything of a package is built at the same time (as for the tests). This is significantly faster than before.
* No longer builds the CDK package twice when building the tests or demo-app.
2017-09-28 15:30:38 -07:00
Andrew Seguin 20a23f16e8 fix: remove all md prefixes (#7241) 2017-09-28 13:45:03 -07:00
Jeremy Elbourn 3571f68a2d chore: add changelog for beta.11 (#7239) 2017-09-21 15:18:57 -07:00
Kristiyan Kostadinov f2419bf769 chore: bump to Angular 4.4.3 (#7195)
Bumps the minimum Angular version to 4.4.3 to fix some errors in the stepper.

BREAKING CHANGE: Material now requires at least Angular 4.4.3.
2017-09-21 10:45:28 -07:00
Jeremy Elbourn 0e4806b06c chore: move mat re-exports to package where their metadata lives (#7193)
This also required creating a module file for every component because
the max re-export can't be in the same file as the module definition or
else ngc will *only* export the alias.
2017-09-20 15:49:06 -07:00
Paul Gschwendtner 90434668bb build: fix payload calculation (#7132)
* Due to the recent changes in the Material package, the payload is no longer calculated correctly. All components have been moved into different bundles instead of a single bundle.
2017-09-18 09:57:25 -07:00
Kristiyan Kostadinov a611d36ece build: new packaging not working on Windows (#7120)
Fixes the new packaging throwing an error on Windows as a result of b296e2bd59.
2017-09-18 09:55:16 -07:00
Jeremy Elbourn df808b845c build: fix material unit tests not running (#7117) 2017-09-15 15:28:38 -07:00
Jeremy Elbourn a96b545d28 fix: add mat exportAs and class aliases (#7106) 2017-09-15 13:55:38 -07:00
Jeremy Elbourn b296e2bd59 build: compile entry-points in parallel (#7094) 2017-09-15 13:51:08 -07:00
Paul Gschwendtner 5ec538eeeb build: fix umd bundles build task (#7102)
Currently when trying to serve the devapp, the `build-bundles` task seems to be broken. Rollup is not able to properly read the source files from the disk because the `.js` file extension is missing.
2017-09-15 08:36:36 -07:00
Paul Gschwendtner 34b5620aa3 build: cancel screenshot diff if there is no activity (#6957)
* build: cancel screenshot diff if there is no activity

* No longer just gives the screenshot diff task 8 minutes to pass, because the run time can vary. Now it just exits the process if the last action in the task takes longer than 6 minutes.
* Instead of just closing the firebase connection, the process will be exited with an error code. Just closing the connection is not helpful and breaks the screenshot diff Web Interface.

* Add comments
2017-09-14 17:11:12 -07:00
Jeremy Elbourn b8218e1489 build: fix regex for matching imports for umd generation (#7093) 2017-09-14 17:10:46 -07:00
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
mmalerba 9545427c73 feat(datepicker): Add Moment.js adapter (#6860)
* create moment adapter

* add Moment to karma.conf.js

* use MAT_DATE_LOCALE

* tests are now running

* add in tests

* WIP: demo

* add synthetic default imports for moment

* add locale switching to demo

* fix moment import issues with tests

* fix aot

* address comments

* fix closure issue

* add additional explanation of rollup issue

* remove moment adapter demo since it is preventing sync into g3 (will add
back as a docs example in future PR).

* fix bad rebase
2017-09-12 13:24:23 -07:00
Will Howell 9f2fd477f2 docs: sort class properties and methods (#6893)
* docs: sort class properties and methods

- Properties are sorted in the order of [Inputs, Outputs, neither]. Secondary sorting done alphabetically.
- Methods are sorted alphabetically.
- All deprecated members are sorted to the end.

* Use the same sort for methods and properties
2017-09-08 14:28:26 -07:00
Kristiyan Kostadinov 5f4c44ebb1 build: infinite loop when determining dependencies on windows (#6884)
Fixes the `findstr` command going into an infinite loop on Windows due to it not being scoped to TS files.
2017-09-06 13:11:30 -07:00
Kristiyan Kostadinov d3abd726e2 build: add tslint rule for validating decorators (#6800)
* Reworks the `noViewEncapsulationRule` to turn into a more generic rule that allows us to validate multiple properties and decorators.
* Fixes a few components that were caught without a `moduleId` after implementing the new rule.
* Adds validation that all components have a `moduleId`.

Fixes #6778.
2017-09-06 11:13:01 -07:00
Paul Gschwendtner 835014a709 build: missing minified umd bundles in releases (#6809)
With the recent change of the CDK entry points the copy glob in `build-release.ts` has been updated accidentally to no longer include the ".umd.min.js" files.

Fixes #6796
2017-09-06 10:12:40 -07:00
Kristiyan Kostadinov 001001cb37 build: custom tslint rules not executing in IDEs (#6817)
Fixes our custom tslint rules not executing IDEs, because they're written in TypeScript. This is the preferred option over switching them back to ES6, because some rules require access to TS files from other parts of the build (e.g. the Rollup globals rule).
2017-09-06 10:12:13 -07:00
Paul Gschwendtner 28ede304fb build: stricter unused variable checking (#6633)
Currently only variables that don't start with an underscore will be checked by TSLint.

This doesn't make sense, because variables get prefixed with an underscore to indicate that they are not part of the public API, but still need to be public in favor of AOT compilation for example. This means that those properties are having the public modifier set (explicitly or automatically) and therefore won't be treated as unused anyway.

**TL;DR**: With this change, prefixed variables will be checked by the `no-unused-variable` TSLint rule and those which are marked as `private` and are unused will be catched by TSLint.
2017-09-01 08:05:46 -07:00
Paul Gschwendtner 950edccbc4 build: invalid paths when building examples module (#6673)
On Windows, if someone runs the `gulp build-examples-module` task, the `example-module.ts` file will be generated incorrectly. Path delimiters are missing in the TypeScript imports because the Windows path delimiters are being removed accidentally.
2017-08-29 19:41:15 -07:00
Paul Gschwendtner 2b7475576d chore: add codeowner for moment adapter package (#6691)
* Adds @mmalerba as codeowner for the new Material moment adapter package.
2017-08-29 19:40:38 -07:00
Paul Gschwendtner d2787963e5 build: create docs for missing cdk entry points (#6695)
* A few secondary entry points of the CDK are not added to the Dgeni processor and therefore no API HTML files will be generated.
2017-08-29 18:31:17 -07:00
Paul Gschwendtner deca032d2d build: secondary entry-points resolving for windows (#6652)
Currently the secondary entry-points are resolved by running `grep` as a child process. This works fine on MacOS, Linux and on Windows if Git Bash is installed.

With this change, the secondary entry-points will be resolved on Windows using the `findstr` command. The `findstr` command is always available on Windows and therefore Git Bash is no longer a requirement.

Closes #6211
2017-08-28 16:30:24 -07:00
Paul Gschwendtner 9644840e4c build: write custom tslint rules in typescript (#6650)
Currently the custom TSLint rules of the repository had to be pushed as JavaScript files because TSLint was only able to run them as JavaScript files.

Recently with TSLint 5.7.0 (https://github.com/palantir/tslint/commit/90dd3f472199c68662eaecc47663969cb8ea6ed1), custom rules can be also loaded directly as TypeScript files in combination with ts-node.
2017-08-28 16:29:57 -07:00
Paul Gschwendtner 412c9fc4bc build: add empty material-moment-adapter package (#6086) 2017-08-28 16:27:56 -07:00
Paul Gschwendtner 6b9c936fe4 build: use minimatch for no-view-encapsulation rule (#6621) 2017-08-24 10:19:39 -07:00
Kristiyan Kostadinov 2fc6a4c782 refactor: turn off view encapsulation for all components (#6563)
Fixes #6037.
2017-08-22 17:44:18 -07:00
Jeremy Elbourn e0b1094d62 chore(e2e): fix consistent timeouts (#6574) 2017-08-22 10:53:15 -07:00
Kristiyan Kostadinov 66da5973db feat: update to Angular 4.3 (#6483)
* feat: update to Angular 4.3

* Bumps the Angular requirement to 4.3. This is also a prerequisite to the Angular 5 update since we encountered the same errors there.
* Refactors the sidenav not to use a `Promise.resolve` for toggling the initial animation, because it was making it impossible to flush the animations in unit tests. The new simplified approach uses a property to pass the animation state.
* Fixes the nested menu test failures.
* Fixes a "changed after checked" error in the autocomplete demo app.

Relates to #6454.

* fix: e2e failures
2017-08-16 13:14:12 -07:00
Jeremy Elbourn 4d82f833c7 feat(cdk): move overlay into cdk (#6100) 2017-08-11 15:42:36 -07:00
Paul Gschwendtner fc98a1d0cf build: move changelog script to gulp task (#5472)
* Moves the changelog script to a gulp task that includes better instructions and error reporting.
2017-08-08 23:18:38 -07:00
Kristiyan Kostadinov 8b54715053 feat(dialog): open dialog API improvements (#6289)
* Makes the `openDialog` public.
* Adds a unique id to each `MdDialogRef`, as well as the option to override the id and to look dialogs by id.
* The `afterAllClosed` stream now emits on subscribe if there are no open dialogs.

Fixes #6272.
2017-08-07 14:23:21 -07:00
Paul Gschwendtner 18a85f35a1 build: version placeholder replacement grep alternative (#6290)
For the version placeholde replacement a Grep statement is used as well. For Windows environments there is an alternative called `Findstr` which can be used to avoid having a dependency on ported Unix-tools.
2017-08-07 11:34:57 -07:00
Austin 4851dea42e chore(build): add examples to docs build and annotate table examples (#6311) 2017-08-07 10:23:47 -07:00
Paul Gschwendtner 5ecc509763 chore: fix missing types error for screenshot-tool functions (#6286)
The Google Cloud functions for the screenshot-test tool can't be deployed on the CI because there appear to be some errors that indicate that the types for the `jsonwebtoken` package are not installed.

This commit adds the types for the `jsonwebtoken` package to the dependencies (similar as for the dashboard)
2017-08-07 10:19:43 -07:00
Paul Gschwendtner 48d092093d build: fix docs generation highlight files task (#6285)
Recently with https://github.com/angular/material2/commit/edcbb24f11ae776b94d97634ae91e9175ffd6f8a the ambigious variable `path` has been renamed to `filePath`, but there is one remaining instance of `path` that didn't get updated.

This currently causes the docs-content CI job to fail.
2017-08-07 10:19:15 -07:00
Paul Gschwendtner 509e3e90f5 build: fix error when running devapp on windows (#6288)
Currently developers using Windows are not able to serve the devapp because the secondary entry-points can't be resolved. This can happen because of two things:

* `egrep`, which is an alias for `grep -E` is not part of the global `$PATH` variable on Windows
* The Regular Expression for the `grep` call is ambiguous and expects zero-width characters to be present.

This commit changes the `spawnSync` call to use `grep -E` and also changes the Regular Expression to be more explicit about what characters to match after the `from`.
2017-08-07 10:18:48 -07:00
Jeremy Elbourn f913cc992a chore: don't hard-code cdk build order (#6207)
* chore: don't hard-code cdk build order

* Use BuildPackage

* packagename grep

* fix rollup globals conflict
2017-08-04 14:05:07 -07:00
Paul Gschwendtner c6c7908c29 chore(): fix package dependencies for screenshot-tool app (#6276)
Recently some utilities have been moved from the Material package to the CDK package. At this point Material added the CDK as a peer dependency.

The screenshot-test application uses the most recent (released) Angular Material version (due to the caret in the semver expression) but doesn't have a dependency on the CDK yet.

This commit adds the CDK as a dependency and also switches Material and the CDK to the latest build artifcats on GitHub (as same as for the dashboard).
2017-08-04 14:03:26 -07:00
Paul Gschwendtner 991c1e0d90 chore(tslint): use globs for custom rule source file filtering (#6235)
A few custom TSLint rules already accept an option array that can be used to whitelist specific files. These whitelists are based on normal Regular Expressions which do not work very well for path matching.

This commit changes the existing whitelists to use minimatch, which is a package that allows matching strings/paths against globs. For rules like `requireLicenseBanner` where the whitelist is hardcoded right now, the whitelist has been introduced as well.
2017-08-04 14:00:29 -07:00
Paul Gschwendtner f19d2e52ee chore(tslint): custom rules invoke superclass methods (#6215)
A few rules are not implemented properly because their associated walker is overwriting hooks from the `SyntaxWalker` superclass. Those custom hooks need to invoke the method on the superclass as well.

See https://palantir.github.io/tslint/develop/custom-rules/
2017-08-02 14:33:56 -07:00
Paul Gschwendtner 4168fb39db build: stop hardcoding rollup globals for CDK entry points (#6150)
* Now the rollup globals for the CDK secondary entry-points are no longer hard-coded. There is already a method called `getSecondaryEntryPointsForPackage` which can be used.
2017-08-02 14:31:31 -07:00
Paul Gschwendtner 056d3b2e81 build: make packaging more flexible (#6143)
* Makes the packaging more flexible by no longer including checks that are specific to the Angular Material project (e.g `material` => `lib` mapping)
* Updates the code to be more readable by making the packaging more object orientated (TS compilation helpers shouldn't be part of the gulp task generation)
2017-08-01 14:21:39 -07:00