Skip to content

Commit

Permalink
feat: expose compiler as library
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelstroschein committed Dec 25, 2024
1 parent 896602f commit e2b9e24
Show file tree
Hide file tree
Showing 8 changed files with 1,066 additions and 943 deletions.
18 changes: 18 additions & 0 deletions .changeset/soft-chairs-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@inlang/paraglide-js": minor
---

feat: expose compiler as library

closes https://github.com/opral/inlang-paraglide-js/issues/206

The Paraglide compiler is now exposed as a library. This allows you to use and extend the compiler however you need.

```ts
import { compile } from '@inlang/paraglide-js/compiler';

await compile({
path: "/path/to/project.inlang",
outdir: "/path/to/output",
});
```
2 changes: 2 additions & 0 deletions packages/inlang-paraglide-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
"vitest": "2.0.5"
},
"exports": {
"./cli": "./dist/cli/index.js",
"./compiler": "./dist/compiler/index.js",
".": {
"import": "./default/index.js",
"types": "./default/index.d.ts"
Expand Down
Loading

0 comments on commit e2b9e24

Please sign in to comment.