Skip to content

ranmocy/web-stub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Stub Generator

Generate JSDoc and JavaScript stub from WebIDL for IDE auto-completion and type checking.

Optimized for WebStorm.

Happy hacking!

Screenshots

Method auto completion Method auto completion

Params auto completion Params auto completion

Params type-sensitive completion Params type sensitive completion

Params validation Params type check

Usage

Download this package by npm install web-stub or git clone https://github.com/ranmocy/web-stub.git. Setup your IDE to add web-stub/js folder or any JS file under it to be a library.

Note: Do not include this folder to your production code. This is for IDE only.

WebStorm: WebStorm settings

Supported API

Dev

Install dependencies: npm install

To get WebIDL: node . update

To generate JS files from WebIDL: node .

To continuesly generate files: rvm 2.3 do rerun -p 'idl/*|main.js' -x -- node .

To test: node . all && if ! git diff-index --quiet HEAD; then exit 1; fi

Dependencies

Contribution

There are ways that you can contribute to this project:

  1. Create Issue if you found IDE have issue about the interface. Please find the minimal code snippet that can reproduce the issue. Better with a screenshot.
  2. Provide more WebIDL that is commonly used. Please attach the link to W3C definition website like https://www.w3.org/TR/IndexedDB/.
  3. Send pull request on main.js. It currently can not handle all cases of WebIDL. Please help me to support more WebIDLs.

About

Generate JSDoc and JavaScript stub from WebIDL for IDE auto-completion and type checking.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published