diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-02-22 13:11:01 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-02-22 13:11:01 +0100 |
commit | e4520cdc2761ee8c03c44949dbfdd710cb9af619 (patch) | |
tree | d236a0e10a27a8a55aec96a06dc46c2fa5328835 | |
parent | e40c13c62de806169368adc7c2c4212f7df6413b (diff) | |
download | kvision-e4520cdc2761ee8c03c44949dbfdd710cb9af619.tar.gz kvision-e4520cdc2761ee8c03c44949dbfdd710cb9af619.tar.bz2 kvision-e4520cdc2761ee8c03c44949dbfdd710cb9af619.zip |
Documentation updates0.0.4
-rw-r--r-- | Config.md | 52 | ||||
-rw-r--r-- | README.md | 16 |
2 files changed, 23 insertions, 45 deletions
@@ -18,58 +18,22 @@ Next add dependencies on Kotlin and KVision: } KVision applications are using [Kotlin frontend plugin](https://github.com/Kotlin/kotlin-frontend-plugin) -to download and integrate a number of NPM dependencies. To make upgrades easier, all of them are listed in -the single **npm.dependencies** file, located in the root directory of the project. +to download and integrate a number of NPM dependencies. Some of them are listed in +a separate **npm.dependencies** file, located in the root directory of the project. Currently this file contains: - css-loader * - style-loader * - less * - less-loader * - imports-loader * - uglifyjs-webpack-plugin * - file-loader * - url-loader * - jquery 3.3.1 bootstrap 3.3.7 bootstrap-webpack 0.0.6 - font-awesome 4.7.0 - font-awesome-webpack 0.0.5-beta.2 - awesome-bootstrap-checkbox 0.3.7 bootstrap-select 1.12.4 ajax-bootstrap-select 1.4.3 - trix 0.11.1 - fecha 2.3.2 bootstrap-datetime-picker 2.4.4 bootstrap-touchspin 3.1.1 - snabbdom 0.6.9 - snabbdom-virtualize 0.7.0 - navigo 7.0.0 - jquery-resizable-dom 0.26.0 - -In case of an upgrade you should synchronize above content with the same [file](https://raw.githubusercontent.com/rjaros/kvision/master/npm.dependencies) -located in the KVision source tree on GitHub. - -NPM dependencies are used in your build.gradle with the following configuration: + font-awesome 4.7.0 + font-awesome-webpack 0.0.5-beta.2 + awesome-bootstrap-checkbox 0.3.7 + trix 0.11.1 - buildscript { - ... - ext.npmdeps = new File("npm.dependencies").getText() - ... - } - ... - kotlinFrontend { - npm { - npmdeps.eachLine { line -> - def (name, version) = line.tokenize(" ") - dependency(name, version) - } - devDependency("karma") - } - webpackBundle { - bundleName = "main" - contentPath = file('src/main/web') - } - } +These are optional dependencies and can be removed if the corresponding features are not used in your KVision application. +This can make the generated JavaScript code much smaller. See [KVision examples](https://github.com/rjaros/kvision-examples) for more details.
\ No newline at end of file @@ -28,12 +28,15 @@ This design is quite similar to many non-web UI programming libraries including - Includes convenient forms implementation, with support for many different input components and easy to use validation. - Data binding support for [observable](https://github.com/rjaros/kotlin-observable-js) data model. - Ready to explore [KVision examples](https://github.com/rjaros/kvision-examples) are available, -built with [Gradle](https://gradle.org/) and supporting Webpack's [Hot Module Replacement (HMR)](https://webpack.js.org/concepts/hot-module-replacement/). +built with [Gradle](https://gradle.org/) and supporting Webpack's [Hot Module Replacement (HMR)](https://webpack.js.org/concepts/hot-module-replacement/) and +[Kotlin JavaScript DCE (dead code elimination)](https://kotlinlang.org/docs/reference/javascript-dce.html). - [Karma](https://karma-runner.github.io/) testing framework support. - IDE support (IntelliJ IDEA Community Edition). ## Getting started +#### Development + 1. Download [KVision examples](https://github.com/rjaros/kvision-examples) from GitHub: git clone https://github.com/rjaros/kvision-examples.git @@ -50,6 +53,17 @@ built with [Gradle](https://gradle.org/) and supporting Webpack's [Hot Module Re 4. Open [http://localhost:8088/](http://localhost:8088/) in your browser. +5. Play with the code and see your changes immediately in the browser. + +#### Production + +To build complete application optimized for production run: + + ./gradlew -Pprod=true distZip (on Linux) + gradlew.bat -Pprod=true distZip (on Windows) + +Application package will be saved as build/distributions/showcase.zip. + ## Usage samples ### Hello world |