https://github.com/turansky/kfc-plugins
Kotlin/JS Fast Configuration
https://github.com/turansky/kfc-plugins
configuration gradle-plugin kotlin kotlin-js
Last synced: 7 months ago
JSON representation
Kotlin/JS Fast Configuration
- Host: GitHub
- URL: https://github.com/turansky/kfc-plugins
- Owner: turansky
- License: apache-2.0
- Created: 2020-02-11T07:45:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-30T00:21:48.000Z (8 months ago)
- Last Synced: 2024-10-30T01:53:11.716Z (8 months ago)
- Topics: configuration, gradle-plugin, kotlin, kotlin-js
- Language: Kotlin
- Homepage:
- Size: 2.91 MB
- Stars: 47
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/turansky/kfc-plugins/actions)
[](https://github.com/turansky/kfc-plugins/actions)
[](https://plugins.gradle.org/plugin/io.github.turansky.kfc.library)
[](http://kotlinlang.org)# Kotlin/JS Fast Configuration
## `application`
### Usage
#### `build.gradle.kts`
```kotlin
plugins {
id("io.github.turansky.kfc.application") version "13.3.0"
}
```### Defaults
* Kotlin/JS
* Target `es2015`
* Granularity `per-file`### Bundler
We use [Vite](https://vitejs.dev/)
#### Configuration
You can add your custom `vite.config.mjs` ([example](examples/vite/custom-config/vite.config.mjs))
#### Dev Server
1. Add `index.html` file with module script to JS
entrypoint ([example](examples/vite/vite-dev/src/jsMain/resources/index.html))2. Specify custom config file with `root` to `kotlin` ([example](examples/vite/vite-dev/vite.config.mjs))
3. Start a dev server, run `jsViteRun` task ([example](examples/vite/vite-dev))
### Source Maps
Enable source maps generation:
```properties
kfc.source.maps=true
```