ulixee / noderdom

Convert WebIDL files to W3C-spec compliant builds for NodeJs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Install

Install from NPM:

npm install noderdom

How to Use

First, either create or recreate the database:

yarn db:create

or

yarn db:reset

Step 0 - Import

./scripts/0-import/importDocsFromMDN.ts
./scripts/0-import/importDetailDocsFromMDN.ts

Step 1 - Process

Generate database records:

./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:

./scripts/1-process/customizer.ts

Create DOM:

./scripts/0-import/importComponentFiltersFromDb.ts awaited
./scripts/1-process/compileAwaitedComponents.ts
./scripts/2-finalize/generateDOM.ts awaited
./scripts/2-finalize/generateDocs.ts

License

MIT

About

Convert WebIDL files to W3C-spec compliant builds for NodeJs

License:MIT License


Languages

Language:HTML 99.3%Language:TypeScript 0.6%Language:WebIDL 0.1%Language:Vue 0.0%Language:Shell 0.0%Language:JavaScript 0.0%