sandrock / SrkToolkit

Here goes another set of libraries to help out. Separated into a few assemblies to avoid loading too much stuff in your app.
Apache License 2.0
2 stars 3 forks source link

Make WebDependency use relative site URLs (~/) #5

Closed sandrock closed 7 years ago

sandrock commented 8 years ago

Current behavior

new WebDependencyFile("/Scripts/common.js", WebDependencyFileType.Javascript) renders as src="/Scripts/common.js"; which is OK but does not allow to put the app in a site subfolder.

new WebDependencyFile("~/Scripts/common.js", WebDependencyFileType.Javascript) renders as src="~/Scripts/common.js"; which is wrong.

Desired behavior

new WebDependencyFile("/Scripts/common.js", WebDependencyFileType.Javascript) should not change.

new WebDependencyFile("~/Scripts/common.js", WebDependencyFileType.Javascript) should render as src="/subfolder/Scripts/common.js"; where /subfolder if computed using the base app url.