Commit Graph

24 Commits

Author SHA1 Message Date
Elliott Marquez
9f3e55d79a docs: auto-generate API docs
Updates API docs in our markdown files with Lit Analyzer by manually running `npm run update-docs`

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-web/pull/4946 from material-components:api-docs 1322ca962041a4b1f30ef7ad3ef2c7eb9087f42b
PiperOrigin-RevId: 566834596
2023-09-19 21:05:47 -07:00
Elizabeth Mitchell
395bb065cd chore: move navigation elements to labs
PiperOrigin-RevId: 536572523
2023-05-30 19:24:12 -07:00
Elliott Marquez
494a3a0870 docs(catalog): implement metadata shell for catalog
PiperOrigin-RevId: 534577741
2023-05-23 15:27:19 -07:00
Elliott Marquez
0ba943066d build: copybara transforms for demos
PiperOrigin-RevId: 531000171
2023-05-10 14:05:05 -07:00
Material Web Team
09e17eb486 build(TS): remove decorator metadata
This removes the types from being emitted in the resultant JS. We need to remove them because they break SSR because they will emit types such as `HTMLElement` into the JS.

PiperOrigin-RevId: 524034517
2023-04-13 10:16:20 -07:00
Alexander Marks
89054e4154 Exclude irrelevant types like node and remove skipLibCheck 2022-11-29 17:00:05 -08:00
Alexander Marks
96805fe668 chore: Don't publish .ts or testing files
Before this change, we publish .ts source files to the same directory as the .js/.d.ts files to npm.

That means when a consumer imports a @material/web module with TypeScript, TypeScript prefers the .ts file over the .d.ts file when to load that module's types.

That in turn means the consumer's TypeScript type-checks the entire @material/web .ts file, including its private implementation details (private fields, etc.). If the consumer's tsconfig.json is configured more strictly than @material/web's was (e.g. if noUnusedParameters is true), or if some additional ambient types are loaded (e.g. @types/node is installed, which changes the signature of setTimeout), they would get a compile error.

This change stops publishing .ts files to npm to solve that problem for consumers.

This also includes some related changes:

- Sets inlineSources to true. This puts the .ts file contents directly inside the .js.map file, instead of linking to the .ts path. Otherwise sourcemaps would not work.

- Sets declarationMap to false. This removes the .d.ts.map files, which are not useful without the .ts paths, because there is no equivalent to inlineSources for declarationMap (see https://github.com/microsoft/TypeScript/issues/38966).

- Replaces .npmignore blocklist with package.json files allowlist (which I find to be a bit safer), and adds new omissions for testing files, which don't need to be published.

Note that this doesn't solve the problem when using "npm link" for local cross-package development, because in that case the .ts files will still be present. So a better solution to this problem would be to have a separate src/ directory for .ts source files. That will require a Copybara transform to move the files. We can discuss this separately and do it as a followup if agreed.

PiperOrigin-RevId: 469833263
2022-08-24 15:04:04 -07:00
Elizabeth Mitchell
ecf2578569 chore: add package.json with basic build
PiperOrigin-RevId: 467933458
2022-08-16 08:37:48 -07:00
Elizabeth Mitchell
c44514764a chore: add tsconfig.json file
PiperOrigin-RevId: 455653943
2022-06-17 11:00:54 -07:00
Material Web Team
41d41cc278 chore: update repository for Material 3
PiperOrigin-RevId: 455635969
2022-06-17 16:42:04 +00:00
Elizabeth Mitchell
8cba18fac6
chore(switch): add github build deps for deprecated switch (#2534) 2021-07-14 13:23:21 -07:00
Elliott Marquez
2da93a86a8 chore: update lit-analyzer & lint rules 2021-01-22 15:36:19 -08:00
Elliott Marquez
b6980dce30 chore: bump license year & fix tsconfig 2020-09-22 17:55:20 -07:00
Elliott Marquez
09c24f1ae7 feat(elevation-overlay): implement elevation overlay 2020-09-22 17:11:22 -07:00
Liz Mitchell
8604d59edb
chore: remove src folder from packages in GitHub (#1706)
* chore: remove src folder from packages in GitHub

* chore: add extra newline to button sass
2020-08-17 17:59:35 -07:00
Allan Chen
237be55b9b chore: update external circular-progress-four-color tsconfig 2020-07-28 08:59:50 -07:00
Allan Chen
d186665304 chore: update circular progress package files 2020-07-22 15:03:39 -07:00
Daniel Freedman
b44dea36eb
Sync lit-analyzer settings with internal (#1432)
Internally, we disable a few checks in lit-analyzer for easier integration of other tools

`no-unknown-attribute` is disabled for teams to add app-specific attributes.

Incidentally, this also fixes our issue with https://github.com/runem/lit-analyzer/pull/107
2020-06-16 13:54:55 -07:00
Daniel Freedman
d0b2419c62 fix typescript compilation
- Remove reference to notched outline from list
- Also add all packages as references in the top tsconfig for simpler
  building
2020-01-31 19:55:28 -08:00
Alexander Marks
761dc62083
Import TypeScript helpers from tslib, instead of inlining. (#439)
Published JavaScript files no longer include inlined TypeScript helpers such as `__decorate`. Instead, helpers are now imported from the `tslib` module dependency. This reduces code size by allowing multiple components to share the same helpers, and eliminates "this has been rewritten to undefined" errors from Rollup.
2019-08-28 11:47:31 -07:00
Daniel Freedman
17f46249e6 Fix typescript building
- Add back-references to dependencies for `tsc --build` to work
- Normalize on `build:typescript` syntax
- make `clean` work
2019-02-01 15:39:47 -08:00
Daniel Freedman
2b9ee8a141 Only build sass files if they change
Makes typescript builds _way_ faster
2018-09-26 11:37:50 -07:00
Daniel Freedman
30de182f5e Address feedback 2018-09-20 16:55:27 -07:00
Daniel Freedman
80f901b4d7 First crazy attempt at typescript conversion
Look at switch and base packages

Move sass building into scripts
2018-09-19 17:35:42 -07:00