Example of how to easily compile Kotlin to javascript with typesafe access to the jQuery library. Allows using any other javascript libraries (when converted using ts2kt, see below). Packages everything together via browserify (require.js) for distribution.
./dist.sh
open dist/index.html
in your browser.
You should now see an animated textual counter.
make use of npm and broswerify- integrate kotlinx
It should be easy (not tested yet) to extend this project with other javascript libraries:
-
add npm-dependency to package.json
if no npm-package is available you can also put the library's *.js-file(s) to the web-directory
-
find typescript-file and transform it via ts2kt
-
use it via
require(...)