diff --git a/README.md b/README.md index 793abfe..1bd60c3 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,12 @@ Sample project with a simple implementation of the webxdc read and write APIs. ## Developing webxdc apps -Simply copy `webxdc.js` from this repo beside your `index.html` and you are ready to go -to **develop and test your app in most browsers.** +Include: +```html + +``` +in your `index.html` to use a webxdc emulator and you are ready to +**develop and test your app in most browsers.** Bundle your app using `./create-xdc.sh your-app-name` and **send it to your friends** 🙂 @@ -23,6 +27,11 @@ and **send it to your friends** 🙂 ## Further Hints and Troubleshooting +### Type-checking + +If you want to have type-checking you can use [@webxdc/types](https://github.com/webxdc/webxdc-types/) package, check: + +https://github.com/webxdc/webxdc-types/ ### Limitations @@ -34,24 +43,6 @@ bundle the app and test it in Delta Chat directly where all peers get their own `localStorage`. Alternatively, use the more advanced [webxdc-dev](https://github.com/webxdc/webxdc-dev) tool. - -### Type-checking and completion - -If you are using VSCode you can have autocompletion and type-checking even without using TypeScript by adding these two lines to your JavaScript source files: - -```js -//@ts-check -/** @typedef {import('./webxdc').Webxdc} Webxdc */ -``` - -Without VSCode you need to install TypeScript and then run the check manually. - -```sh -npm -g typescript -tsc --noEmit --allowJs --lib es2016,dom webxdc.js # to check if types and simulator are in sync -tsc --noEmit --allowJs --lib es2016,dom your_js_file.js -``` - ### Developing in Safari To use the devtool in safari you need to disable the local file restrictions diff --git a/index.html b/index.html index 594563e..d65cb4b 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ Hello +