Closed MikeAlhayek closed 3 years ago
Resource versioning is already well supported, and documented
https://docs.orchardcore.net/en/latest/docs/reference/modules/Resources/#set-the-version-to-use
That's not what's this request is about. While you can define a version for your resource, as well as request a specific version of it when including it, you can't specify a version for its dependencies (unless you not use the manifest approach but include all dependencies in all locations manually). Or am I missing something?
Unless I have misunderstood the feature request is for being able to add specific version to a dependency, like this
depends_on:"foo:1.0"
, or the same with .SetDependencies("foo:1.0)
?
Here's another link to the docs regarding how to do this https://docs.orchardcore.net/en/latest/docs/reference/modules/Resources/#inline-definition
SetDependencies("foo:1.0)
is it, yes. Great then, didn't know about this. This should be added to the docs here so let's keep this issue for that. Would you like to contribute this small docs improvement, @CrestApps?
@Piedone sure! @deanmarcussen is “any” and “latest” something being already supported as well? If not, how can I ensure only one bootstrap version is being included?
Thanks! The default behavior without "latest", then.
This is now about documenting the feature, see comments. The original feature request is below.
Is your feature request related to a problem? Please describe.
In the theme layout, I want to enforce bootstrap 4.6 so I added this
<script asp-name="bootstrap" version="4" at="Foot"></script>
which includes bootstrap 4 as desired.I created a module that allows me to convert a select-menu to a searchable-menu. This module depends on bootstrap and jquery to be able to function. So in the
ResourceManagementOptionsConfiguration
class, I defined the dependencies like thisUnfortunately, the
SetDependencies("bootstrap")
call here forces to include bootstrap 5 which will cause bootstrap 4 and 5 to be included! Obviously this is a problem!Describe the solution you'd like
I would suggest adding a way to specify version when calling
SetDependencies()
method using something like thisI also suggest adding a new method
ResourceDefinition SetDependency(string dependency, string version = "latest")
this would allow the user to define a single dependency with a version.Describe alternatives you've considered
Not sure there is a solution in place for this problem. More info can be found in the discussion #10113