web-stub
v0.0.5
Published
Generate placeholder for IDE from WebIDL
Downloads
15
Maintainers
Readme
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
Params auto completion
Params type-sensitive completion
Params validation
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:
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:
- 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.
- Provide more WebIDL that is commonly used. Please attach the link to W3C definition website like https://www.w3.org/TR/IndexedDB/.
- Send pull request on main.js. It currently can not handle all cases of WebIDL. Please help me to support more WebIDLs.