File tree Expand file tree Collapse file tree 2 files changed +43
-4
lines changed Expand file tree Collapse file tree 2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,9 @@ definitions:
6767 the number of breaking changes. This is currently WIP and some members may be
6868 added or removed.
6969
70- ## Generation
70+ ## Generation and updating the package
7171
72- Most of the APIs in this package are generated from public assets. See the
73- [ tool directory] ( https://github.com/dart-lang/web/tree/main/tool ) in the source
74- repository to learn more.
72+ Most of the APIs in this package are generated from public assets. See
73+ [ tool/README.md] ( https://github.com/dart-lang/web/tree/main/tool ) for
74+ information on the spec and IDL versions the package was generated from, and for
75+ the process for updating the package.
Original file line number Diff line number Diff line change 1+ ## Updating the package
2+
3+ The Dart code in this package is generated from Web IDL definitions and MDN API
4+ documentation.
5+
6+ ### Regenerating the package
7+
8+ To regenerate the package from the current IDL versions, run:
9+
10+ ``` shell
11+ dart tool/update_bindings.dart
12+ ```
13+
14+ ### Updating the dartdoc info from MDN
15+
16+ package: web 's dartdoc comments come from the
17+ [ MDN Web Docs] ( https://developer.mozilla.org/en-US/docs/Web ) project. In order
18+ to update to the latest version of the documentation, run:
19+
20+ ``` shell
21+ dart tool/scrape_mdn.dart
22+ ```
23+
24+ That will collect the MDN documentation into ` third_party/mdn/mdn.json ` ; changes
25+ to that file should be committed to git. You'll need to run
26+ ` tool/update_bindings.dart ` to produce Dart code using the updated documentation.
27+
28+ ### Updating to use the latest Web IDL versions
29+
30+ To re-generate the package from newer IDL versions, you can either run:
31+
32+ ``` shell
33+ dart tool/update_bindings.dart --update
34+ ```
35+
36+ or, edit manually edit ` tool/generator/package.json ` to use specific IDL
37+ versions, and re-run ` tool/update_bindings.dart ` .
38+
139## Web IDL versions
240
341Based on:
You can’t perform that action at this time.
0 commit comments