https://github.com/ulixee/noderdom
Convert WebIDL files to W3C-spec compliant builds for NodeJs
https://github.com/ulixee/noderdom
Last synced: 10 months ago
JSON representation
Convert WebIDL files to W3C-spec compliant builds for NodeJs
- Host: GitHub
- URL: https://github.com/ulixee/noderdom
- Owner: ulixee
- License: mit
- Created: 2020-05-12T16:18:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-01T21:05:14.000Z (about 3 years ago)
- Last Synced: 2025-08-09T01:54:46.520Z (10 months ago)
- Language: HTML
- Size: 18.6 MB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Noderdom is a library for generating Typescript interfaces, classes and mixins representing the DOM structure as expressed in WebIDL.
This tool was originally based on the fantastic work by the Typescript team for generating their dom.generated.d.ts files: [TSJS-lib-generator](https://github.com/typescript/tsjs-lib-generator).
# Install
Install from NPM:
```
npm install noderdom
```
# How to Use
First, either create or recreate the database:
```bash
yarn db:create
```
or
```bash
yarn db:reset
```
## Step 0 - Import
```bash
./scripts/0-import/importDocsFromMDN.ts
./scripts/0-import/importDetailDocsFromMDN.ts
```
## Step 1 - Process
Generate database records:
```bash
./scripts/1-process/dbGenerator/insertInterfaces.ts
./scripts/1-process/dbGenerator/insertPropertiesAndMethods.ts
./scripts/1-process/dbGenerator/insertMDNDocumentation.ts
./scripts/1-process/dbGenerator/insertSupers.ts
./scripts/1-process/dbGenerator/insertComponentFilters.ts
```
Run customizer:
```bash
./scripts/1-process/customizer.ts
```
Create DOM:
```bash
./scripts/0-import/importComponentFiltersFromDb.ts awaited
./scripts/1-process/compileAwaitedComponents.ts
./scripts/2-finalize/generateDOM.ts awaited
./scripts/2-finalize/generateDocs.ts
```
## License
[MIT](LICENSE.md)