![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
kotlin-scripts
Advanced tools
Configuration and scripts for Create React App with Kotlin.
$ yarn create react-app my-app -- --scripts-version kotlin-scripts
Kotlin Scripts provides a JS-like development environment for developing web apps with the Kotlin programming language and React. It bootstraps an environment to automatically compile all Kotlin code to JS, provide features like reloading and bundling, and seamlessly use JS code from Kotlin.
Note that using
yarn create
requires Yarn 0.25 or later
To create a new app using Kotlin and React, run:
$ npm install -g bs-platform
$ yarn create react-app <app-name> -- --scripts-version reason-scripts
$ cd <app-name>
$ yarn start
$ npm install -g bs-platform create-react-app
$ create-react-app <app-name> --scripts-version reason-scripts
$ cd <app-name>
$ npm start
Creating a new app makes an <app-name>
directory with the following layout:
<app-name>/
README.md
node_modules/
package.json
build.gradle
.gitignore
public/
favicon.ico
index.html
src/
main/
kotlin/
index.kt
app.kt
style/
index.css
app.css
img/
logo.svg
The entry point to the app is src/main/kotlin/index.kt
. From the start your new
app will be based on Kotlin, but can seamlessly interop with existing JS
files and projects!
Any Kotlin file will be automatically compiled to a JS file. Once the bundle is compiled, any Kotlin code can be called from JavaScript. For example, to call a method from a specific Kotlin module:
import { add } from 'main'
const sum = add(1, 4)
You can require CSS files with:
runtime.wrapper.require("./App.css")
or any other kind of file (like SVG's) with:
var logo : string = runtime.wrapper.require("./logo.svg")
In order to get all the benefits of the Kotlin tool-system, use the Intellij IDE with the Kotlin plugin.
Checkout the Kotlin website: https://kotlinlang.org/ !
There's also Slack to come talk about Reason, and ask for help: https://slack.kotlinlang.org
This project was conceived by Carey Janecka and was in large part inspired by the reason-scripts project. If you wish to contribute, please start by submitting an issue for documentation. If you have the requisite skills to tackle the problem, please fork this repository and submit a pull request.
FAQs
Configuration and scripts for Create React App with Kotlin.
The npm package kotlin-scripts receives a total of 2 weekly downloads. As such, kotlin-scripts popularity was classified as not popular.
We found that kotlin-scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.