Skip to content

Commit

Permalink
Merge pull request #18 from Lombiq/issue/OSOE-856
Browse files Browse the repository at this point in the history
OSOE-856: Update Shepherd to >=12.0.2 in Lombiq.Walkthroughs
  • Loading branch information
DemeSzabolcs authored Jun 16, 2024
2 parents f5751d1 + aefd705 commit 9f9f612
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 120 deletions.
4 changes: 4 additions & 0 deletions Lombiq.Walkthroughs/Assets/Scripts/shepherd-to-window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-disable */
import Shepherd from '/Lombiq.Walkthroughs/shepherd.js/js/shepherd.mjs';

window.Shepherd = Shepherd;
1 change: 1 addition & 0 deletions Lombiq.Walkthroughs/Constants/ResourceNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ public static class ResourceNames

public const string Shepherd = Prefix + "shepherd.js";
public const string Walkthroughs = nameof(Walkthroughs);
public const string ShepherdToWindow = "shepherd-to-window.js";
}
12 changes: 10 additions & 2 deletions Lombiq.Walkthroughs/ResourceManagementOptionsConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ static ResourceManagementOptionsConfiguration()

_manifest
.DefineScript(Shepherd)
.SetAttribute("type", "module")
.SetUrl(
"~/" + FeatureIds.Area + "/shepherd.js/js/shepherd.min.js",
"~/" + FeatureIds.Area + "/shepherd.js/js/shepherd.js");
"~/" + FeatureIds.Area + "/shepherd.js/js/shepherd.mjs");

_manifest
.DefineScript(ShepherdToWindow)
.SetAttribute("type", "module")
.SetUrl(
"~/" + FeatureIds.Area + "/js/shepherd-to-window.min.js",
"~/" + FeatureIds.Area + "/js/shepherd-to-window.js"
);

_manifest
.DefineScript(ResourceNames.Walkthroughs)
Expand Down
1 change: 1 addition & 0 deletions Lombiq.Walkthroughs/Services/ResourceFilters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public void AddResourceFilter(ResourceFilterBuilder builder)
builder.Always().RegisterStylesheet(Shepherd);
builder.Always().RegisterFootScript(Shepherd);
builder.Always().RegisterFootScript(Constants.ResourceNames.Walkthroughs);
builder.Always().RegisterFootScript(ShepherdToWindow);
}
}
2 changes: 1 addition & 1 deletion Lombiq.Walkthroughs/Views/WalkthroughsButton.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="text-center">
<button id="walkthrough-selector-button" class="shepherd-button shepherd-button-primary">
<button id="walkthrough-selector-button" class="shepherd-button shepherd-button-primary" type="button">
@T["Click here to select a walkthrough!"]
</button>
</div>
96 changes: 0 additions & 96 deletions Lombiq.Walkthroughs/package-lock.json

This file was deleted.

4 changes: 2 additions & 2 deletions Lombiq.Walkthroughs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"shepherd.js": "^11.2.0"
"shepherd.js": "12.0.6"
},
"scripts": {
"build": "npm explore nodejs-extensions -- pnpm build",
Expand All @@ -19,7 +19,7 @@
},
{
"sources": [
"node_modules/shepherd.js/dist/js"
"node_modules/shepherd.js/dist/esm"
],
"pattern": "*",
"target": "wwwroot/shepherd.js/js"
Expand Down
43 changes: 24 additions & 19 deletions Lombiq.Walkthroughs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f9f612

Please sign in to comment.