{"id":20901547,"url":"https://github.com/willfarrell/fluent-transpiler","last_synced_at":"2025-05-13T03:30:46.723Z","repository":{"id":59791440,"uuid":"538697134","full_name":"willfarrell/fluent-transpiler","owner":"willfarrell","description":"Transpile Fluent (ftl) files into optomized, tree-shakable, JavaScript EcmaScript Modules (esm).","archived":false,"fork":false,"pushed_at":"2025-05-01T20:54:27.000Z","size":58,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-01T20:55:14.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willfarrell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-19T21:05:39.000Z","updated_at":"2025-05-01T20:54:32.000Z","dependencies_parsed_at":"2024-06-19T16:39:44.647Z","dependency_job_id":"5b5431ad-4f7a-4597-9a8d-e4cf1dd47577","html_url":"https://github.com/willfarrell/fluent-transpiler","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":"0.19999999999999996","last_synced_commit":"0a4c648986c4442241e03c5909dade1c424ef462"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Ffluent-transpiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Ffluent-transpiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Ffluent-transpiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Ffluent-transpiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willfarrell","download_url":"https://codeload.github.com/willfarrell/fluent-transpiler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253867334,"owners_count":21976204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T11:35:55.753Z","updated_at":"2025-05-13T03:30:46.448Z","avatar_url":"https://github.com/willfarrell.png","language":"JavaScript","readme":"# fluent-transpiler\n\nTranspile Fluent (ftl) files into optimized, tree-shakable, JavaScript EcmaScript Modules (esm).\n\n## Install\n\n```bash\nnpm i -D fluent-transpiler\n```\n\n## CLI\n\n```bash\nUsage: ftl [options] \u003cinput\u003e\n\nCompile Fluent (.ftl) files to JavaScript (.js or .mjs)\n\nArguments:\n  input                                   Path to the Fluent file to compile\n\nOptions:\n  --locale \u003clocale...\u003e                    What locale(s) to be used. Multiple can be set to allow for fallback. i.e. en-CA\n  --comments                              Include comments in output file.\n  --variable-notation \u003cvariableNotation\u003e  What variable notation to use with exports (choices: \"camelCase\", \"pascalCase\", \"constantCase\",\n                                          \"snakeCase\", default: \"camelCase\")\n  --disable-minify                        If disabled, all exported messages will have the same interface `(params) =\u003e ({value, attributes})`.\n  --use-isolating                         Wrap placeable with \\u2068 and \\u2069.\n  -o, --output \u003coutput\u003e                   Path to store the resulting JavaScript file. Will be in ESM.\n  -h, --help                              display help for command\n```\n\n## NodeJS\n\n| Option           | Description                                                                                                                                                                                                                                                  |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| locale           | What locale(s) to be used. Multiple can be set to allow for fallback. i.e. en-CA                                                                                                                                                                             |\n| comments         | Include comments in output file. Default: true                                                                                                                                                                                                               |\n| disableMinify    | If disabled, all exported messages will have the same interface `(params) =\u003e ({value, attributes})`. Default: each exported message could be a different type based on what is needed to generate the message (`string`, `object`, `() =\u003e ''`, `() =\u003e ({})`) |\n| errorOnJunk      | Throw error when `Junk` is parsed. Default: true                                                                                                                                                                                                             |\n| variableNotation | What variable notation to use with exports. Default: `camelCase`                                                                                                                                                                                             |\n| useIsolating     | Wrap placeable with \\u2068 and \\u2069. Default: false                                                                                                                                                                                                        |\n| exportDefault    | Allows the overwriting of the `export default` to allow for custom uses. Default: See code                                                                                                                                                                   |\n\n```javascript\nimport { readFile, writeFile } from 'node:fs/promises'\nimport fluentTranspiler from 'fluent-transpiler'\n\nconst ftl = await readFile('./path/to/en.ftl', { encoding: 'utf8' })\nconst js = fluentTranspiler(ftl, { locale: 'en-CA' })\nawait writeFile('./path/to/en.mjs', js, 'utf8')\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillfarrell%2Ffluent-transpiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillfarrell%2Ffluent-transpiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillfarrell%2Ffluent-transpiler/lists"}