{"id":16690763,"url":"https://github.com/omaxel/rcompressor","last_synced_at":"2025-06-16T10:33:29.609Z","repository":{"id":87214000,"uuid":"128363891","full_name":"omaxel/RCompressor","owner":"omaxel","description":"A compressor for Razor Views.","archived":false,"fork":false,"pushed_at":"2021-07-11T08:03:12.000Z","size":34,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T16:00:01.560Z","etag":null,"topics":["aspnet-core-mvc","aspnet-mvc","compressor","optimization","optimization-tools","razor","razor-views"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omaxel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-04-06T07:30:26.000Z","updated_at":"2024-05-20T07:57:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fa10646-bafb-4f3a-b44b-edeea2261ed3","html_url":"https://github.com/omaxel/RCompressor","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"117062d064ac5650715d0d1c554fa9dbbb0c1f40"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2FRCompressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2FRCompressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2FRCompressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2FRCompressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omaxel","download_url":"https://codeload.github.com/omaxel/RCompressor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243475330,"owners_count":20296714,"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":["aspnet-core-mvc","aspnet-mvc","compressor","optimization","optimization-tools","razor","razor-views"],"created_at":"2024-10-12T16:05:16.651Z","updated_at":"2025-03-13T20:22:34.220Z","avatar_url":"https://github.com/omaxel.png","language":"C#","readme":"\u003cimg src=\"http://raw.github.com/OmarMuscatello/RCompressor/master/rcompressor.png\" height=\"70\" alt=\"RCompressor\"\u003e\n\n# RCompressor\n\nA compressor for Razor Views.\n\n**Help me!** Improve this translation with a pull request.\n\n### [Download latest version](https://github.com/OmarMuscatello/RCompressor/releases/download/v1.0/RCompressor-v1.0.zip) \nor see [previous versions](https://github.com/OmarMuscatello/RCompressor/releases).\n\n##### Summary\n- [Introduction](#introduction)\n- [How to use](#how-to-use)\n  - [Command line usage](#command-line-usage)\n\n## Introduction\nHave you ever thought that the generated HTML from a `.cshtml` file is not optimized?\n\nTake a look at the below code which is the content of a simple `_Layout.cshtml` file:\n\n```\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003e@ViewData[\"Title\"] - WebApplication6\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cdiv\u003e\n        @RenderBody()\n        \u003cfooter\u003eMyWebApplication\u003c/footer\u003e\n    \u003c/div\u003e\n    @RenderSection(\"Scripts\", required: false)\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nAnd the below code is the content of a simple `Index.cshtml` file:\n\n```\n@{\n    ViewData[\"Title\"] = \"Home Page\";\n}\n\u003cdiv class=\"row\"\u003e\n    \u003ch1\u003eThis the Index page\u003c/h1\u003e\n\u003c/div\u003e\n```\n\nWhen you visit the page through the browser, the generated HTML is:\n\n```\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eHome Page - WebApplication6\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cdiv\u003e\n        \u003cdiv class=\"row\"\u003e\n    \u003ch1\u003eThis the Index page\u003c/h1\u003e\n\u003c/div\u003e\n        \u003cfooter\u003eMyWebApplication\u003c/footer\u003e\n    \u003c/div\u003e\n    \n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nHow many spaces and empty new lines!\n\nThe response size is 650B. This is not a problem if the page is small, but think about bigger pages.\n\nUsing **RCompressor**, you can strip out the code from spaces, empty lines, and comments.\n\nProcessing the previous `.cshtml` files with **RCompressor** the response size becomes 604B, which is ~8% smaller. You can save a lot of bytes in bigger files.\n\n## How to use\n- [Download](https://github.com/OmarMuscatello/RCompressor/releases/download/v1.0/RCompressor-v1.0.zip) the latest version of **RCompressor** and launch it (no installation required);\n- paste the directory/file path in the first field;\n- check the *Scan subfolders* option if required;\n- press the *Compress* button.\n\n### Command line usage\nYou can use **RCompressor** using the command line by passing the paths as parameters.\n\nAdd the `-subfolders` option to scan subfolders.\n\n**Usage example:** \n```\n\u003e RCompressor.exe -subfolders \"C:\\MyDir\" \"C:\\MyFile.cshtml\"\n```\n\n**RCompressor** will compress all `.cshtml` files inside `C:\\MyDir` and subfolders. It will also compress the `C:\\MyFile.cshtml` file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaxel%2Frcompressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomaxel%2Frcompressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaxel%2Frcompressor/lists"}