From 3ccd76401d3099520e4eb2f007175987d4187bc0 Mon Sep 17 00:00:00 2001 From: Vincent Guillebaud Date: Sat, 1 Feb 2025 18:10:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Document=20the=20installation=20?= =?UTF-8?q?process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/development.mdx | 97 ------------------------------- docs/dialogs/setup.mdx | 4 ++ docs/installation.mdx | 68 ++++++++++++++++++++++ docs/mint.json | 8 ++- docs/snippets/filekit-version.mdx | 1 + 5 files changed, 80 insertions(+), 98 deletions(-) delete mode 100644 docs/development.mdx create mode 100644 docs/dialogs/setup.mdx create mode 100644 docs/installation.mdx create mode 100644 docs/snippets/filekit-version.mdx diff --git a/docs/development.mdx b/docs/development.mdx deleted file mode 100644 index 0ba0c59..0000000 --- a/docs/development.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: 'Development' -description: 'Learn how to preview changes locally' ---- - - - **Prerequisite**: Please install Node.js (version 19 or higher) before proceeding. - - -Step 1. Install Mintlify on your OS: - - - -```bash npm -npm i -g mintlify -``` - -```bash yarn -yarn global add mintlify -``` - - - -Step 2. Go to the docs are located (where you can find `mint.json`) and run the following command: - -```bash -mintlify dev -``` - -The documentation website is now available at `http://localhost:3000`. - -### Custom Ports - -Mintlify uses port 3000 by default. You can use the `--port` flag to customize the port Mintlify runs on. For example, use this command to run in port 3333: - -```bash -mintlify dev --port 3333 -``` - -You will see an error like this if you try to run Mintlify in a port that's already taken: - -```md -Error: listen EADDRINUSE: address already in use :::3000 -``` - -## Mintlify Versions - -Each CLI is linked to a specific version of Mintlify. Please update the CLI if your local website looks different than production. - - - -```bash npm -npm i -g mintlify@latest -``` - -```bash yarn -yarn global upgrade mintlify -``` - - - -## Deployment - - - Unlimited editors available under the [Pro - Plan](https://mintlify.com/pricing) and above. - - -You should see the following if the deploy successfully went through: - - - - - -## Troubleshooting - -Here's how to solve some common problems when working with the CLI. - - - - Update to Node v18. Run `mintlify install` and try again. - - -Go to the `C:/Users/Username/.mintlify/` directory and remove the `mint` -folder. Then Open the Git Bash in this location and run `git clone -https://github.com/mintlify/mint.git`. - -Repeat step 3. - - - - Try navigating to the root of your device and delete the ~/.mintlify folder. - Then run `mintlify dev` again. - - - -Curious about what changed in a CLI version? [Check out the CLI changelog.](/changelog/command-line) diff --git a/docs/dialogs/setup.mdx b/docs/dialogs/setup.mdx new file mode 100644 index 0000000..872b8c2 --- /dev/null +++ b/docs/dialogs/setup.mdx @@ -0,0 +1,4 @@ +--- +title: 'Setup' +description: 'Learn how to preview changes locally' +--- diff --git a/docs/installation.mdx b/docs/installation.mdx new file mode 100644 index 0000000..750bfa1 --- /dev/null +++ b/docs/installation.mdx @@ -0,0 +1,68 @@ +--- +title: Installation +description: 'Install FileKit in your Kotlin Multiplatform project' +--- + +import FilekitVersion from '/snippets/filekit-version.mdx' + +To use FileKit in your Kotlin Multiplatform / Compose Multiplatform project, you need to add the dependency to your `build.gradle.kts` file. + +FileKit supports those targets: +- Android +- iOS, macOS +- JVM (Windows, macOS, Linux) +- JS, WASM + +## Dialogs + +FileKit can helps you to display dialogs to the user like file, directory and photo pickers, save dialogs, camera and more. FileKit dialogs are available in two flavors: + +```kotlin build.gradle.kts +// Enables FileKit dialogs without Compose dependencies +implementation("io.github.vinceglb:filekit-dialogs:0.10.0") + +// Enables FileKit dialogs with Composable utilities +implementation("io.github.vinceglb:filekit-dialogs-compose:0.10.0") +``` + +## PlatformFile + +FileKit provides a platform-agnostic file abstraction called `PlatformFile`. It allows you to work with files in a platform-agnostic way. You can create, read, write, and delete files using the `PlatformFile` API. + +You can use `PlatformFile` in your project by adding the following dependency: + +```kotlin build.gradle.kts +implementation("io.github.vinceglb:filekit-core:0.10.0") +``` + +## Coil + +FileKit provides a Coil extension to load images from a `PlatformFile` object. You can use the `PlatformFile` object to load images from a file. + +You can use the Coil extension in your project by adding the following dependency: + +```kotlin build.gradle.kts +implementation("io.github.vinceglb:filekit-coil:0.10.0") +``` + +## Linux setup + +If using JVM target and Linux distribution, you need to add the following module: + +```kotlin build.gradle.kts +compose.desktop { + application { + nativeDistributions { + linux { + modules("jdk.security.auth") + } + } + } +} +``` + +It prevents having a `NoClassDefFoundError` on some cases. Read more about it [here](https://github.com/vinceglb/FileKit/issues/107). + +--- + +Next, continue your journey with the [Setup](/dialogs/setup) guide. diff --git a/docs/mint.json b/docs/mint.json index aeb8fb1..5cc61c1 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -33,7 +33,13 @@ "pages": [ "introduction", "quickstart", - "development" + "installation" + ] + }, + { + "group": "Dialogs", + "pages": [ + "dialogs/setup" ] }, { diff --git a/docs/snippets/filekit-version.mdx b/docs/snippets/filekit-version.mdx new file mode 100644 index 0000000..2774f85 --- /dev/null +++ b/docs/snippets/filekit-version.mdx @@ -0,0 +1 @@ +0.10.0 \ No newline at end of file