-
Notifications
You must be signed in to change notification settings - Fork 439
Update README.md #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update README.md #16
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,9 @@ | |
This tool is used to generate `dom.generated.d.ts` and `webworker.generated.d.ts` for TypeScript, and `domWeb.js` and `domWindows.js` for Visual Studio JavaScript language service. The input file is the XML spec file generated by the Microsoft Edge browser. | ||
|
||
## Build Instruction | ||
To build the tool, simply clone the repo, and run `build.cmd` in command line or powershell. If it runs successfully, the output files will be generated under the `generated` folder. | ||
To build the tool, simply clone the repo, and run `build.cmd` (Windows) or `build.sh` (OSX) in command line. If it runs successfully, the output files will be generated under the `generated` folder. | ||
|
||
## Code Structure | ||
- `Shared.fs`: handles the parsing from XML spec file, and stores the common data structures for later use; | ||
- `TS.fs`: handles the emitting of the `lib.d.ts` file; | ||
- `JS.fs`: handles the emitting of the `domWeb.js` and `domWindows.js` | ||
Note: for OSX users, [Mono 4.2](http://www.mono-project.com/download/alpha/) is required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same 'OSX' -> 'OS X/Unix' change here. |
||
|
||
## Contribution Guide | ||
The `dom.generated.d.ts` and `webworker.generated.d.ts` files in the TypeScript repo are used as baselines. | ||
|
@@ -21,6 +18,17 @@ For common changes, it is sufficient to change the json files. | |
There are three json files that are used to alter the file generation: `addedTypes.json`, `overridingTypes.json` and `removedTypes.json`. | ||
The format of each file can be inferred from their existing content. | ||
|
||
The common steps to send a pull request is: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. common steps ... are: |
||
0. Open or refer to an issue in the [TypeScript repo](https://github.com/Microsoft/TypeScript). | ||
1. Add missing elements to `inputfiles/addedTypes.json`, overriding elements to `inputfiles/overridingTypes.json`, or elements to remove to `inputfiles/removedTypes.json`. | ||
2. Run the script locally to obtain new `dom.generated.d.ts` and `webworker.generated.d.ts`. | ||
3. Update the files in the `baselines` folder using the newly generated files. | ||
|
||
## Code Structure | ||
- `Shared.fs`: handles the parsing from XML spec file, and stores the common data structures for later use; | ||
- `TS.fs`: handles the emitting of the `lib.d.ts` file; | ||
- `JS.fs`: handles the emitting of the `domWeb.js` and `domWindows.js` | ||
|
||
## Input Files: | ||
- `browser.webidl.xml`: the XML spec file generated by Microsoft Edge (due to the different updating schedules between Edge and TypeScript, this may **not** be the most up-to-date version of the spec.); | ||
- `webworker.webidl.xml`: contains additional types for webworker. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OSX to Unix or "OS X/Unix"