-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Parjs-211-expose-compiler-as-library
- Loading branch information
Showing
28 changed files
with
1,144 additions
and
1,002 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@lix-js/server-api-schema": patch | ||
--- | ||
|
||
fix: emit .js file for node js | ||
|
||
Otherwise, node js will throw "UNKNOWN FILE EXTENSION .ts". |
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/inlang-paraglide-js/example/project.inlang/settings.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "@inlang/paraglide-js-example-cli", | ||
"type": "module", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"_dev": "paraglide-js compile --project ./project.inlang --watch", | ||
"build": "paraglide-js compile --project ./project.inlang", | ||
"pretest": "paraglide-js compile --project ./project.inlang" | ||
}, | ||
"devDependencies": { | ||
"@inlang/paraglide-js": "workspace:*", | ||
"typescript": "^5.5.2", | ||
"vitest": "^2.0.5" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
packages/inlang-paraglide-js/examples/cli/project.inlang/settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://inlang.com/schema/project-settings", | ||
"baseLocale": "en", | ||
"locales": ["en", "de", "en-US"], | ||
"modules": [ | ||
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js" | ||
], | ||
"plugin.inlang.messageFormat": { | ||
"pathPattern": "./messages/{locale}.json" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.