Skip to content

Commit

Permalink
Fix doc mispellings
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Jun 9, 2024
1 parent 2083419 commit b45d096
Show file tree
Hide file tree
Showing 17 changed files with 174 additions and 183 deletions.
10 changes: 5 additions & 5 deletions docs/pages/documentation/advanced/custom-version.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ title: Custom Flutter SDK (Forks)

import { Callout } from "nextra/components";

# Custom Flutter Version (forks)
# Custom Flutter Version (Forks)

You can use custom Flutter versions (forks) within FVM cache.
You can use custom Flutter versions (forks) within the FVM cache.

To do that, you have to prefix the version with `custom_` and then add the name of the version. For example, if you want to use a custom version of Flutter, you can do the following.
To do that, you have to prefix the version with `custom_` and then add the name of the version. For example, if you want to use a custom version of Flutter, you can do the following:

```bash
fvm use [custom_name]
```

<Callout type="info">

Run `fvm list` to view the cache directory, and the current cached versions.
Run `fvm list` to view the cache directory and the current cached versions.

</Callout>
</Callout>
30 changes: 14 additions & 16 deletions docs/pages/documentation/advanced/json-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ fvm api list [options]

**Options:**

- `--compress` (`-c`): Outputs JSON with no whitespace.
- `--skip-size-calculation` (`-s`): Skips calculating the size of cached versions.
- `--compress` (`-c`): Outputs JSON with no whitespace.
- `--skip-size-calculation` (`-s`): Skips calculating the size of cached versions.

**Response Payload:**

Expand Down Expand Up @@ -63,10 +63,9 @@ fvm api releases [options]

**Options:**

- `--compress`: Outputs JSON with no whitespace.
- `--limit [number]`: Limits the number of releases listed.
- `--filter-channel [channel]`: Filters the releases by channel. Available channels are `stable`, `beta`, and `dev`.

- `--compress`: Outputs JSON with no whitespace.
- `--limit [number]`: Limits the number of releases listed.
- `--filter-channel [channel]`: Filters the releases by channel. Available channels are `stable`, `beta`, and `dev`.

**Response Payload:**

Expand Down Expand Up @@ -107,13 +106,12 @@ fvm api context [options]

**Options:**

- `--compress`: Outputs JSON with no whitespace.
- `--compress`: Outputs JSON with no whitespace.

**Response Payload:**

```json
{

"context": {
"fvmVersion": "3.0.14",
"workingDirectory": "/path/to/project",
Expand All @@ -125,7 +123,7 @@ fvm api context [options]
"flutterUrl": "https://github.com/flutter/flutter.git",
"lastUpdateCheck": "2024-03-13T14:46:08.735250Z",
"updateCheckDisabled": false,
"priviledgedAccess": false,
"privilegedAccess": false,
"globalCacheLink": "/path/to/.fvm/default",
"globalCacheBinPath": "/path/to/.fvm/default/bin",
"versionsCachePath": "/path/to/.fvm/versions",
Expand All @@ -135,7 +133,7 @@ fvm api context [options]
"args": [
"api",
"info"
],
]
}
}
```
Expand All @@ -152,8 +150,8 @@ fvm api project [options]

**Options:**

- `--compress`: Outputs JSON with no whitespace.
- `--path [path]`: The path to the project. Defaults to the current working directory.
- `--compress`: Outputs JSON with no whitespace.
- `--path [path]`: The path to the project. Defaults to the current working directory.

**Response Payload:**

Expand Down Expand Up @@ -203,12 +201,12 @@ fvm api project [options]
...
},
"dev_dependencies": {
...
...
},
"flutter": {
"uses-material-design": true,
},
},
"uses-material-design": true
}
}
}
}
```
50 changes: 25 additions & 25 deletions docs/pages/documentation/getting-started/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Configure FVM and IDEs for better support for different development environments

## Project

There are two main parts for a project that has FVM configured. The `.fvmrc` config file and the `.fvm` directory.
There are two main parts for a project that has FVM configured: the `.fvmrc` config file and the `.fvm` directory.

### Config File `.fvmrc`

This contains version linked to the project. This file is automatically created when you run `fvm use {version}`. Here you can also find project specific settings, and flavors.
This contains the version linked to the project. This file is automatically created when you run `fvm use {version}`. Here you can also find project-specific settings and flavors.

```json
{
Expand All @@ -31,20 +31,20 @@ This contains version linked to the project. This file is automatically created
}
```

- `flutter`: The version of the Flutter SDK to be used, falling back to the flutter value if not explicitly set.
- `cachePath`: Defines the path to the project's cache directory.
- `useGitCache`: (default: true) Indicates whether the Git cache is used for dependencies.
- `gitCachePath`: Sets the path to the Git cache directory, applicable if useGitCache is true.
- `flutterUrl`: Specifies the URL to the Flutter SDK repository.
- `priviledgedAccess`:(default: true) Determines if configurations requiring elevated permissions are enabled.
- `flavors`: A map defining custom project flavors for different configurations.
- `updateVscodeSettings`: (default: true) Flags whether to auto-update VS Code settings on configuration changes.
- `updateGitIgnore`: (default:true) Indicates whether to auto-update the .gitignore file based on project configurations.
- `runPubGetOnSdkChanges`: (default: true) Triggers flutter pub get automatically upon Flutter SDK version changes.
- `flutter`: The version of the Flutter SDK to be used, falling back to the flutter value if not explicitly set.
- `cachePath`: Defines the path to the project's cache directory.
- `useGitCache`: (default: true) Indicates whether the Git cache is used for dependencies.
- `gitCachePath`: Sets the path to the Git cache directory, applicable if useGitCache is true.
- `flutterUrl`: Specifies the URL to the Flutter SDK repository.
- `privilegedAccess`: (default: true) Determines if configurations requiring elevated permissions are enabled.
- `flavors`: A map defining custom project flavors for different configurations.
- `updateVscodeSettings`: (default: true) Flags whether to auto-update VS Code settings on configuration changes.
- `updateGitIgnore`: (default: true) Indicates whether to auto-update the .gitignore file based on project configurations.
- `runPubGetOnSdkChanges`: (default: true) Triggers flutter pub get automatically upon Flutter SDK version changes.

### .fvm Directory

Inside the directory you will find the following files and directories:
Inside the directory, you will find the following files and directories:

<FileTree>
<FileTree.Folder name=".fvm" defaultOpen>
Expand All @@ -59,16 +59,16 @@ Inside the directory you will find the following files and directories:
</FileTree.Folder>
</FileTree>

- **flutter_sdk** - Symlink to the Flutter SDK version linked to the project.
- **versions** - Directory containing the Flutter SDK versions. This is similar to flutter_sdk, but is used for better VsCode compatibility.
- **fvm_config.json** - (deprecated) This is a legacy configuration file.
- **release** - (internal use only) File containing the release version of FVM.
- **version** - (internal use only) File containing the version of FVM.
- **flutter_sdk** - Symlink to the Flutter SDK version linked to the project.
- **versions** - Directory containing the Flutter SDK versions. This is similar to flutter_sdk but is used for better VS Code compatibility.
- **fvm_config.json** - (deprecated) This is a legacy configuration file.
- **release** - (internal use only) File containing the release version of FVM.
- **version** - (internal use only) File containing the version of FVM.

<Callout type="info">
Starting version 3.0 and above it is recommended to add the `.fvm` directory
Starting with version 3.0 and above, it is recommended to add the `.fvm` directory
to your `.gitignore` file. FVM will automatically add it to .gitignore when
pinning a version to a project, if `updateGitIgnore` is set to `true`.
pinning a version to a project if `updateGitIgnore` is set to `true`.
</Callout>

## Environment Variables
Expand All @@ -77,8 +77,8 @@ Set environment variables at the system level to apply configurations globally.

## Supported Environment Variables:

- `FVM_CACHE_PATH`: Specifies the cache path for Flutter versions.
- `FVM_USE_GIT_CACHE`: Enables/disables the git cache globally (`true`/`false`).
- `FVM_GIT_CACHE_PATH`: Sets the path for the local git reference cache.
- `FVM_FLUTTER_URL`: Defines the Flutter repository git URL.
- `FVM_PRIVILEDGED_ACCESS`: Enables/disables privileged access for FVM (`true`/`false`).
- `FVM_CACHE_PATH`: Specifies the cache path for Flutter versions.
- `FVM_USE_GIT_CACHE`: Enables/disables the git cache globally (`true`/`false`).
- `FVM_GIT_CACHE_PATH`: Sets the path for the local git reference cache.
- `FVM_FLUTTER_URL`: Defines the Flutter repository git URL.
- `FVM_PRIVILEGED_ACCESS`: Enables/disables privileged access for FVM (`true`/`false`).
54 changes: 27 additions & 27 deletions docs/pages/documentation/getting-started/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,84 +5,84 @@ title: FAQ

# FAQ

### Upgrade Flutter Channel
## Upgrade Flutter Channel

As described in our [Principles](../getting-started/#principles) FVM does not override standard Flutter behavior. Therefore to upgrade a channel you will have to use standard `flutter upgrade`. You can find more about it in the [Running Flutter](../guides/running-flutter) section.
As described in our [Principles](../getting-started/#principles), FVM does not override standard Flutter behavior. Therefore, to upgrade a channel, you will have to use the standard `flutter upgrade`. You can find more about it in the [Running Flutter](../guides/running-flutter) section.

---

### Cannot install latest version of FVM
## Cannot install the latest version of FVM

When running `dart pub global activate fvm`, pub will grab the latest FVM version that is compatible with the installed dart-sdk. Upgrade to the latest version of the Dart, and run the command again. Go to https://dart.dev/get-dart for more information.
When running `dart pub global activate fvm`, pub will grab the latest FVM version that is compatible with the installed dart-sdk. Upgrade to the latest version of Dart, and run the command again. Go to [get dart](https://dart.dev/get-dart) for more information.

---

### How to uninstall FVM
## How to uninstall FVM

Run command `fvm destroy` to remove FVM from your system.
If you installed using pub run `dart pub global deactivate fvm`, if you used a standalone installation please follow its instructions.
Run the command `fvm destroy` to remove FVM from your system.
If you installed using pub, run `dart pub global deactivate fvm`. If you used a standalone installation, please follow its instructions.

---

### Commands run twice on Windows
## Commands run twice on Windows

This happens due to a pub issue https://github.com/dart-lang/pub/issues/2934. To avoid this issue from happening make sure you PATH is in the following order. [Please read the following](#environment-variables-order-for-windows-in-path).
This happens due to a pub issue [dart-lang:2934](https://github.com/dart-lang/pub/issues/2934). To avoid this issue from happening, make sure your PATH is in the following order. [Please read the following](#environment-variables-order-for-windows-in-path).

---

### Invalid kernel binary or invalid sdk hash when running FVM
## Invalid kernel binary or invalid SDK hash when running FVM

There are a few reasons this can happen. However it means that the FVM snapshot is not compatible with the Dart version that is installed.
There are a few reasons this can happen. However, it means that the FVM snapshot is not compatible with the Dart version that is installed.

Please do the following:

1. On Windows make sure your env variables are in the following order as described [here](#environment-variables-order-for-windows-in-path).
2. Run `dart pub global deactivate fvm`
3. Run `dart pub global activate fvm`
1. On Windows, make sure your environment variables are in the following order as described [here](#environment-variables-order-for-windows-in-path).
2. Run `dart pub global deactivate fvm`.
3. Run `dart pub global activate fvm`.

---

### Command 'pub' not found
## Command 'pub' not found

If you get `Command 'pub' not found`, then make sure to append `export PATH="$PATH:/usr/lib/dart/bin"` to your `~/.bashrc` (gets reiniated each time you open a bash shell) or `~/.profile` (only read at login) file.
If you get `Command 'pub' not found`, then make sure to append `export PATH="$PATH:/usr/lib/dart/bin"` to your `~/.bashrc` (gets reinitiated each time you open a bash shell) or `~/.profile` (only read at login) file.

---

### Environment variables order for Windows in PATH
## Environment variables order for Windows in PATH

Flutter comes with Dart embedded. Because of that you can find some conflicts when running standalone Dart and Flutter together. Here is a suggestion of what we found to be the correct order of dependencies to avoid issues.
Flutter comes with Dart embedded. Because of that, you can find some conflicts when running standalone Dart and Flutter together. Here is a suggestion of what we found to be the correct order of dependencies to avoid issues.

1. Pub Cache for global packages
2. Dart SDK (if installed outside of Flutter)
3. Flutter SDK

It should look like this.
It should look like this:

```
```bash
C:\Users\<user>\AppData\Roaming\Pub\Cache\bin
C:\src\flutter\bin\cache\dart-sdk\bin
C:\src\flutter\bin
```

### Git not found after install on Windows
## Git not found after install on Windows

Some users may be greeted by this error after installing FVM in a project.

```
```bash
Error: Unable to find git in your PATH.
```

This happens because of a security update from git where Git now checks for ownership of the folder trying to ensure that the folder you are using Git in has the same user as the owner as your current user account.
This happens because of a security update from Git where Git now checks for ownership of the folder, trying to ensure that the folder you are using Git in has the same user as the owner as your current user account.
To fix this, we need to mark our repos as safe using the following command:

```
```bash
git config --global --add safe.directory '*'
```

Restart your terminals and VS Code after running this command. This should fix the issue
Restart your terminals and VS Code after running this command. This should fix the issue.

If you don’t want to mark all the repos as safe, then you can mark only the flutter repo as safe by passing the flutter path instead of *
If you don’t want to mark all the repos as safe, then you can mark only the Flutter repo as safe by passing the Flutter path instead of `*`:

```
```bash
git config --global --add safe.directory C:\Users\someUser\flutter\.git\
```
7 changes: 3 additions & 4 deletions docs/pages/documentation/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ FVM helps with the need for consistent app builds by referencing the Flutter SDK
- Testing new SDK features requires switching between [Channels](https://flutter.dev/docs/development/tools/sdk/releases).
- The switch between channels is slow and requires reinstalling every time.
- No way of keeping track of the latest working/used version of the SDK in an app.
- Major Flutter updates require migration of all Flutter apps in the machine.
- Major Flutter updates require migration of all Flutter apps on the machine.
- Inconsistent development environments between other devs in the team.

## Video Guides & Walkthroughs

You can view a playlist of many Youtube guides & walkthroughs done by the incredible Flutter community in many different languages.
You can view a playlist of many YouTube guides & walkthroughs done by the incredible Flutter community in many different languages.

<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLVnlSO6aQelAAddOFQVJNoaRGZ1mMsj2Q" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Expand All @@ -28,13 +28,12 @@ We follow these principles when building and adding new features to FVM.

- Always use Flutter tools when interacting with the SDK.
- Do not override any Flutter CLI commands.
- Follow Flutter suggested installation instructions accomplish caching.
- Follow Flutter suggested installation instructions to accomplish caching.
- Should extend Flutter behavior and not modify them.
- API should be simple and easy to understand.

## Contributors


<a href="https://github.com/leoafarias/fvm/graphs/contributors">
<img src="https://contrib.rocks/image?repo=leoafarias/fvm" />
</a>
13 changes: 6 additions & 7 deletions docs/pages/documentation/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ There are a few ways to install FVM, and we are working on other ways to make it

## Recommendation

We recommend install Flutter SDK globally using the official installation guide [here](https://docs.flutter.dev/get-started/install). This will be the main version of Flutter across your machine.
We recommend installing the Flutter SDK globally using the official installation guide [here](https://docs.flutter.dev/get-started/install). This will be the main version of Flutter across your machine.

Use FVM to manage the Flutter SDK version for your projects.

Expand Down Expand Up @@ -44,7 +44,7 @@ brew untap leoafarias/fvm
</Tabs.Tab>
<Tabs.Tab>

To install fvm (Install), run the following command from the command line or from PowerShell:
To install FVM (Install), run the following command from the command line or from PowerShell:

```bash
choco install fvm
Expand Down Expand Up @@ -78,18 +78,17 @@ brew untap leoafarias/fvm
</Tabs.Tab>

<Tabs.Tab>
You are able to also install FVM as a [pub package](https://pub.dev/packages/fvm).
You are also able to install FVM as a [pub package](https://pub.dev/packages/fvm).

However if you plan on using FVM to manage your [global Flutter install](/docs/guides/global_version) we recommend installing as a standalone.
However, if you plan on using FVM to manage your [global Flutter install](/docs/guides/global_version), we recommend installing it as a standalone.

<Callout type="warning">
This is not recommended if you plan on using FVM to manage your global Flutter
install.
This is not recommended if you plan on using FVM to manage your global Flutter install.
</Callout>

```bash
dart pub global activate fvm
```

</Tabs.Tab>
</Tabs>
</Tabs>
Loading

0 comments on commit b45d096

Please sign in to comment.