{"id":20909878,"url":"https://github.com/gitii/packedprettier","last_synced_at":"2025-08-23T16:10:00.080Z","repository":{"id":39991117,"uuid":"450781008","full_name":"Gitii/PackedPrettier","owner":"Gitii","description":"The opinionated code formatter Prettier  packed as dotnet tool.","archived":false,"fork":false,"pushed_at":"2024-02-10T16:50:51.000Z","size":56,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T06:03:45.969Z","etag":null,"topics":["net","prettier"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Gitii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-01-22T10:11:19.000Z","updated_at":"2025-06-11T03:41:17.000Z","dependencies_parsed_at":"2024-11-18T14:13:28.046Z","dependency_job_id":"fb9cf239-368d-47e8-988e-4a444fef31d5","html_url":"https://github.com/Gitii/PackedPrettier","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"a671ca143331f185ab1b5c0f16e81542e328ca66"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/Gitii/PackedPrettier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitii%2FPackedPrettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitii%2FPackedPrettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitii%2FPackedPrettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitii%2FPackedPrettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gitii","download_url":"https://codeload.github.com/Gitii/PackedPrettier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitii%2FPackedPrettier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271755444,"owners_count":24815408,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["net","prettier"],"created_at":"2024-11-18T14:13:08.035Z","updated_at":"2025-08-23T16:10:00.054Z","avatar_url":"https://github.com/Gitii.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PackedPrettier\n\nThe opinionated code formatter Prettier packed as dotnet tool.\n\n# What is `prettier`?\n\n\u003e Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.\n\n[GitHub - prettier/prettier: Prettier is an opinionated code formatter.](https://github.com/prettier/prettier)\n\nIt is written in `javascript` and requires `node` to run.\n\n# What is `PackedPrettier`?\n\n`PackedPrettier` packs `prettier` in an executable for various platforms.\n\nIncluding `node`.\n\nYou can install it using `dotnet tool install`, both as global and local tool.\n\n# Getting started\n\n## Installation\n\nInstall as local `dotnet tool`:\n\n1. If you haven't used any other dotnet tools yet, create a tool manifest first:\n   ```shell\n   dotnet new tool-manifest\n   ```\n2. Install PackedPrettier \n   ```shell\n   dotnet tool install PackedPrettier\n   ```\n\n\n## How to use\n\nIn the terminal:\n\n```shell\ndotnet pprettier --help\n```\n\n\u003e :exclamation: The command is named `pprettier` for brevity and internally `prettier` is executed.\n\nIn Visual Studio\n\n1. Install [RunOnSave: A Visual Studio extension that can run commands on files when they're saved.](https://github.com/waf/RunOnSave)\n\n2. Create a `.onsaveconfig` with this content:\n\n    ```textile\n    [*.{js,jsx,ts,tsx,css,less,scss,vue,json,gql,md}]\n    command = dotnet\n    arguments = pprettier --write \"{file}\"\n    ```\n\nWhen you save a file in VS, `prettier` will reformat it\n\n# Migration from v2 to v3\n\nPrettier has migrated to es modules. This means that the `prettier` package is no longer compatible with `pkg` and `PackedPrettier` v2. Previously the `pkg` package has been used to pack `prettier` into an executable. This is no longer possible. The new version of `PackedPrettier` uses a different approach to pack `prettier` into an executable: `deno`. `deno` compiles `prettier` into an single executable. This executable is then used by the `PackedPrettier` loader to run `prettier` in the same way as before.\n\nDeno does not allow to import modules at runtime, see https://github.com/denoland/deno/issues/8655 for details.\nThat means but plugins and javascript config files (for example `prettier.config.js`) are not supported anymore.\n\nIf this is a showstopper for you, please open an issue and we can discuss a solution. A potential solution could be to use `bun` to pack `prettier`. But `bun` has no stable release for windows yet.\n\nI still consider the windows build of `PackedPrettier` as experimental. If you encounter any issues, please open an issue.\n\n\n# Restrictions\n\nCompared to run `prettier` with `node` there are some restrictions:\n* Plugins are not supported (see https://github.com/denoland/deno/issues/8655 for details)\n* Javascript config files (for example `prettier.config.js`) are not supported\n* All restrictions of `deno` apply\n\nThis is because `deno` does not allow to import modules at runtime.\nIf this is a showstopper for you, please open an issue and we can discuss a solution. A potential solution could be to use `bun` to pack `prettier`. But `bun` has no stable release for windows yet.\n\n# What about C# files (_.cs_)?\n\nThere is a (sort of) port of `prettier` that supports `cs` files:\n\nCheckout [belav/csharpier: an opinionated code formatter for c#.](https://github.com/belav/csharpier) and install it as `dotnet tool`. Then add this to your `.onsaveconfig` file:\n\n```\n[*.cs]\ncommand = dotnet\narguments = csharpier \"{file}\"\n```\n\n# Supported Platforms of `PackedPrettier`\n\n`prettier` is compiled for\n\n-   Windows x64\n\n-   Linux x64\n\nand the loader requires either\n\n-   .Net 6\n\n-   .Net 7\n\n-   .Net 8\n\n\u003e :exclamation: Support for .NET Core 3.1 and .NET 5 has been dropped because they are out of support.\n\n# Mac OS support\n\nThis is not possible because executable has to be signed (with either an adhoc signature) or an Apple Developer ID.\nCheckout the [official `pkg` readme](https://github.com/vercel/pkg#targets) for historical details. The same restrictions apply to `deno`, too.\n\n\n# Found a bug? Have a suggestion?\n\nPlease [create an issue](https://github.com/Gitii/PackedPrettier/issues).\n\nPull requests are always welcome :heart_eyes:\n\n## License\n\nThis software is released under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitii%2Fpackedprettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitii%2Fpackedprettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitii%2Fpackedprettier/lists"}