{"id":21450601,"url":"https://github.com/ogaudefroy/dynamicstylebundles","last_synced_at":"2025-10-11T13:38:41.368Z","repository":{"id":80337841,"uuid":"74700997","full_name":"ogaudefroy/DynamicStyleBundles","owner":"ogaudefroy","description":"A lightweight library which simplifies dynamic assets bundling via System.Web.Optimization","archived":false,"fork":false,"pushed_at":"2017-06-24T13:16:17.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T13:38:38.590Z","etag":null,"topics":["asp-net","bundling","multitenant","white-label-sites"],"latest_commit_sha":null,"homepage":null,"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/ogaudefroy.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":"2016-11-24T19:46:03.000Z","updated_at":"2017-02-27T16:26:58.000Z","dependencies_parsed_at":"2023-06-05T18:45:18.165Z","dependency_job_id":null,"html_url":"https://github.com/ogaudefroy/DynamicStyleBundles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ogaudefroy/DynamicStyleBundles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FDynamicStyleBundles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FDynamicStyleBundles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FDynamicStyleBundles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FDynamicStyleBundles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ogaudefroy","download_url":"https://codeload.github.com/ogaudefroy/DynamicStyleBundles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FDynamicStyleBundles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007345,"owners_count":26084282,"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-10-11T02:00:06.511Z","response_time":55,"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":["asp-net","bundling","multitenant","white-label-sites"],"created_at":"2024-11-23T04:15:55.513Z","updated_at":"2025-10-11T13:38:41.340Z","avatar_url":"https://github.com/ogaudefroy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DynamicStyleBundles\r\nA lightweight library which simplifies dynamic assets bundling via System.Web.Optimization for ASP.Net whitelabel sites. \r\n[![Build status](https://ci.appveyor.com/api/projects/status/95u4qhpatb3kvj7m/branch/master?svg=true)](https://ci.appveyor.com/project/ogaudefroy/dynamicstylebundles/branch/master)\r\n\r\n## Core Features\r\n - Delivers dynamic style assets and bundles them (use case: white label sites)\r\n - Feature toggled cached bundling \r\n - Supports cache dependencies\r\n - Multi tenancy support\r\n \r\n## Getting up and running\r\n### Install\r\nInstall the nuget package ; the setup will add the reference and will tweak your web.config file to add a brand new handler definition.\r\n\r\n`\u003cadd name=\"DynamicStyleBundles\" path=\"DynamicContent/*\" verb=\"GET\" type=\"DynamicStyleBundles.HttpHandlerFactory, DynamicStyleBundles\" preCondition=\"integratedMode\" /\u003e`\r\n\r\n### Configure your application\r\n\r\n - Modify the handler's path to match your needs\r\n - Implement [IAssetLoader](https://github.com/ogaudefroy/DynamicStyleBundles/blob/master/DynamicStyleBundles/IAssetLoader.cs) interface to retrieve your assets from your datastore.\r\n - In your Application_Start method register your configuration.\r\n ```\r\nDynamicStyleBundlesConfig.Current = new DynamicStyleBundlesConfig(() =\u003e GetAssetLoader(), \"~/DynamicContent\");\r\nDynamicStyleBundlesConfig.Current.ApplyConfig();\r\n ```\r\n \r\n### Registering your dynamic bundles\r\nReplace your StyleBundle instantiations by DynamicStyleBundle instantiations and you're up and running to deliver dynamic assets. \r\n\r\nDynamicStyleBundle do support CDN, transforms but also multi tenancy design and feature toggle caching (see below).\r\n\r\n## Advanced scenarios  \r\n### Feature toggled cached bundling\r\nA common scenario when building white label sites is the capability to provide a UI where technical users can update stylesheets, images and fonts. As a consequence when applying dynamic assets bundling it can be very convenient to temporary disable the bundling only for a specific user in order to test its updates.\r\n\r\nThis library implements this requirement with the [ICacheToggleProvider](https://github.com/ogaudefroy/DynamicStyleBundles/blob/master/DynamicStyleBundles/ICacheToggleProvider.cs) interface which creates an extensibility point where you can implement your own feature toggle logic.\r\n\r\nA default toggle provider is provided if no provider is registered with the bundle: [DefaultCacheToggleProvider](https://github.com/ogaudefroy/DynamicStyleBundles/blob/master/DynamicStyleBundles/DefaultCacheToggleProvider.cs) which always activates caching.\r\n\r\n### Multi tenancy support\r\nBy default DynamicStyleBundles supports multitenancy through its caching mechanism which generates caching keys prefixed with HTTP_HOST server variable. This behavior is implemented in [DefaultCacheKeyGenerator](https://github.com/ogaudefroy/DynamicStyleBundles/blob/master/DynamicStyleBundles/DefaultCacheKeyGenerator.cs) class. \r\n\r\nIf this design doesn't match your use case you can create your own cache key generator by implementing [ICacheKeyGenerator](https://github.com/ogaudefroy/DynamicStyleBundles/blob/master/DynamicStyleBundles/ICacheKeyGenerator.cs) and registering your implementation when instantiating your DynamicStyleBundle.\r\n\r\n### Cache dependencies\r\nIt can also be very convenient to be able to automatically refresh your bundle when an asset is edited. By default, DynamicStyleBundle provides a [TimeSpanCacheDependency](https://github.com/ogaudefroy/DynamicStyleBundles/blob/master/DynamicStyleBundles/TimeSpanCacheDependency.cs) which expires after 15 minutes. \r\n\r\nYou can provide an alternate implementation by implementing the [ICacheDependencyBuilder](https://github.com/ogaudefroy/DynamicStyleBundles/blob/master/DynamicStyleBundles/ICacheDependencyBuilder.cs) interface and register it when setting the virtual path provider.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogaudefroy%2Fdynamicstylebundles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogaudefroy%2Fdynamicstylebundles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogaudefroy%2Fdynamicstylebundles/lists"}