Skip to content

Commit

Permalink
Add documentation about wiring up a local Fable compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Jan 23, 2025
1 parent 47c8ae8 commit fd6ea27
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions docs/local-fable-compiler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
index: 7
categoryindex: 1
category: docs
---

# Using a Local Fable Compiler

It is relatively easy to set up a local Fable compiler for troubleshooting the plugin.

## Checkout the Fable Repository

Clone the [Fable repository](https://github.com/fable-compiler/Fable) as a sibling to this repository.

## Using Local Fable Binaries

Set `<UseLocalFableCompiler>true</UseLocalFableCompiler>` in [Directory.Build.props](https://github.com/nojaf/vite-plugin-fable/blob/main/Directory.Build.props). After running `bun install`, the daemon will be built using the local binary.

## Use Local fable-library-js

Sometimes, there could be changes in `@fable-org/fable-library-js` that you need to reflect in the daemon's output.

Build the fable-library using `./build.sh fable-library --javascript` (from the Fable repository root).

Update the `package.json` (in the root) to:

```json
{
"dependencies": {
"@fable-org/fable-library-js": "../Fable/temp/fable-library-js"
}
}
```

Install again using `bun install`.
2 changes: 1 addition & 1 deletion docs/status.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
index: 7
index: 8
categoryindex: 1
category: docs
---
Expand Down

0 comments on commit fd6ea27

Please sign in to comment.