Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datl4g/kromex
Kromex is an extension template written in Kotlin, mainly made for Chrome
https://github.com/datl4g/kromex
brave brave-extension chrome chrome-extension chrome-extensions chromium chromium-extension firefox firefox-extension firefox-extensions firefox-webextension kotlin kotlin-js
Last synced: 4 months ago
JSON representation
Kromex is an extension template written in Kotlin, mainly made for Chrome
- Host: GitHub
- URL: https://github.com/datl4g/kromex
- Owner: DatL4g
- License: apache-2.0
- Created: 2021-06-01T15:15:28.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-01T19:10:34.000Z (over 2 years ago)
- Last Synced: 2024-11-02T08:06:11.061Z (4 months ago)
- Topics: brave, brave-extension, chrome, chrome-extension, chrome-extensions, chromium, chromium-extension, firefox, firefox-extension, firefox-extensions, firefox-webextension, kotlin, kotlin-js
- Language: Kotlin
- Homepage:
- Size: 486 KB
- Stars: 48
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Kromex
- Ever wanted to create a Web-Extension with Kotlin-JS?
- You had no idea where to start or implementation was to difficult?### Kromex to the rescue!
[](https://github.com/DATL4G/Kromex/issues)
[](https://github.com/DATL4G/Kromex/stargazers)
[](https://github.com/DATL4G/Kromex/network/members)
[](https://github.com/DATL4G/Kromex/graphs/contributors)
[](https://github.com/DATL4G/Kromex/blob/master/LICENSE)

## Kromex is a Free and Open Source extension template written in Kotlin
- Provides: popup,content and background out of the box
- Provides: base module for extension API implementation
- Provides: easy build process
- Uses: Manifest v3
- Uses: Kotlin Gradle## Table of content
- [Getting Started](#getting-started)
- [Create your extension](#create-your-extension)
- [Limitations](#limitations)
- [Enums](#enums)
- [Build](#build)
- [Generate APIs](#generate-apis)
- [Export your extension](#export-your-extension)
- [Contributing](#contributing)
- [Maintainers](#maintainers)
- [Support the project](#support-the-project)## Getting Started
Fork this repository or click [Use this template](https://github.com/DATL4G/Kromex/generate).
Import your new repository into IntelliJ or any other IDE of your choice.
## Create your extension
I provided all modules you need out of the box and even some small examples.
Do whatever you want with it.
#### Make sure to replace "Kromex" with your actual extension name.
## Limitations
It's possible that the code were not generated correctly in some cases.
Please create an issue if you've found any wrong parameter/return type etc.### Enums
Enums will be generated as well, however if any function/event returns an enum like:
```kotlin
browser.runtime.getPlatformInfo()
```The enum won't be accessible as such.
Instead, call the ```toString()``` method on it and then create the enum type by this value, e.g.:```kotlin
browser.runtime.getPlatformInfo().collect {
console.log(it.os == PlatformOs.linux)
console.log(PlatformOs.valueOf(it.os.toString()) == PlatformOs.linux)
}
```This will output:
```
false
true
```## Build
### Generate APIs
This is useful e.g. if the API specifications changed.
##### Make sure the previous generated files are deleted
```bash
./gradlew :generate:clean
```##### Generate the files by its specifications
```bash
./gradlew :generate:run
```### Export your extension
##### Rebuild JS files
This step is not needed if you've edited resource files only.
```bash
./gradlew clean assemble
```##### Copy needed files to /build/extension
```bash
./gradlew extension
```## Contributing
When you face any bugs or problems please open an [Issue](https://github.com/DATL4G/BurningSeries-Android/issues/new/choose).
To add functionality fork the project and create a pull request afterwards. You should know how that works if you are a developer :)
You can add yourself to the list below if you want then.### Maintainers
| Avatar | Contributor |
|---|:---:|
| [](http://github.com/DatL4g) | [DatLag](http://github.com/DatL4g) |## Support the project
[](https://github.com/sponsors/DATL4G)
[](https://paypal.me/datlag)
[](https://www.patreon.com/datlag)Supporting this project helps to keep it up-to-date. You can donate if you want or contribute to the project as well.
This shows that the app is used by people and it's worth to maintain.