{"id":16800199,"url":"https://github.com/abiosoft/devreload","last_synced_at":"2025-03-22T02:30:59.194Z","repository":{"id":137636145,"uuid":"199197677","full_name":"abiosoft/DevReload","owner":"abiosoft","description":"Auto reload for ASP.NET core development","archived":false,"fork":false,"pushed_at":"2020-11-01T19:12:05.000Z","size":2012,"stargazers_count":61,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-16T13:47:53.462Z","etag":null,"topics":["asp-net-core","livereload"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abiosoft.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}},"created_at":"2019-07-27T17:58:09.000Z","updated_at":"2024-06-25T15:37:10.000Z","dependencies_parsed_at":"2024-01-13T16:20:29.102Z","dependency_job_id":"d3997436-2c92-4dbe-a43c-9beeac5ab01c","html_url":"https://github.com/abiosoft/DevReload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2FDevReload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2FDevReload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2FDevReload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2FDevReload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abiosoft","download_url":"https://codeload.github.com/abiosoft/DevReload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244173517,"owners_count":20410298,"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":["asp-net-core","livereload"],"created_at":"2024-10-13T09:31:27.898Z","updated_at":"2025-03-22T02:30:58.790Z","avatar_url":"https://github.com/abiosoft.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevReload\n\n[![Nuget](https://img.shields.io/nuget/v/Abiosoft.DotNet.DevReload)](https://www.nuget.org/packages/Abiosoft.DotNet.DevReload)\n\nLive reload for ASP.NET core development.\n\n## Install\n\n```sh\ndotnet add package Abiosoft.DotNet.DevReload --version 0.1.4\n```\n\n## Usage\n\nUse the middleware. Usually in `Startup.cs`\n\n```csharp\nusing Abiosoft.DotNet.DevReload;\n\n...\npublic void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n{\n    if (env.IsDevelopment())\n    {\n        app.UseDevReload();\n    }\n...\n}\n```\n\nThen, add the tag helper to your main layout file.\n\n```cshtml\n@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers\n@addTagHelper *, Abiosoft.DotNet.DevReload\n\n...\n\n\u003cenvironment include=\"Development\"\u003e\n    \u003cdevreload\u003e\u003c/devreload\u003e\n\u003c/environment\u003e\n```\n\nAnd that's all. Just use `dotnet watch run` and your browser will auto reload.\n\n## How\n\nDevReload monitors the ASP.NET app by long polling a REST endpoint and monitor static files with FileSystemWatcher.\n\n## Configure\n\nYou can modify the directories and file extensions for static files only.\n\n**_Note_** that live editing of `cshtml` files may require Razor Runtime Compilation service.\n\n```csharp\napp.UseDevReload(new DevReloadOptions\n{\n    Directory = \".\",\n    IgnoredSubDirectories = new string[] { \".git\", \".node_modules\" },\n    StaticFileExtensions = new string[] { \"cshtml\", \"css\", \"js\", \"html\" },\n});\n```\n\n## Demonstration\n\n![demonstration](./demo.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiosoft%2Fdevreload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabiosoft%2Fdevreload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiosoft%2Fdevreload/lists"}