Skip to content

Commit

Permalink
Documentation and fix asset paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Skrypt committed Feb 27, 2025
1 parent 5436d1d commit c15a9f6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@ static ResourceManagementOptionsConfiguration()
.DefineScript("workflow-editor")
.SetDependencies("jsplumb", "bootstrap")
.SetUrl(
"~/OrchardCore.Workflows/Scripts/workflow-editor.prod.js",
"~/OrchardCore.Workflows/Scripts/workflow-editor.js"
"~/OrchardCore.Workflows/Scripts/Workflows/editor/workflow-editor.prod.js",
"~/OrchardCore.Workflows/Scripts/Workflows/editor/workflow-editor.js"
)
.SetVersion("1.0.0");

_manifest
.DefineScript("workflow-viewer")
.SetDependencies("jsplumb", "bootstrap")
.SetUrl(
"~/OrchardCore.Workflows/Scripts/workflow-viewer.prod.js",
"~/OrchardCore.Workflows/Scripts/workflow-viewer.js"
"~/OrchardCore.Workflows/Scripts/Workflows/viewer/workflow-viewer.prod.js",
"~/OrchardCore.Workflows/Scripts/Workflows/viewer/workflow-viewer.js"
)
.SetVersion("1.0.0");

_manifest
.DefineScript("workflow-url-generator")
.SetDependencies("jQuery")
.SetUrl(
"~/OrchardCore.Workflows/Scripts/workflow-url-generator.prod.js",
"~/OrchardCore.Workflows/Scripts/workflow-url-generator.js"
"~/OrchardCore.Workflows/Scripts/Workflows/url-generator/workflow-url-generator.prod.js",
"~/OrchardCore.Workflows/Scripts/Workflows/url-generator/workflow-url-generator.js"
)
.SetVersion("1.0.0");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ static ResourceManagementOptionsConfiguration()
_manifest
.DefineScript("admin")
.SetDependencies("bootstrap", "admin-main", "theme-manager", "jQuery", "Sortable")
.SetUrl("~/TheAdmin/js/theadmin/TheAdmin.js")
.SetUrl("~/TheAdmin/js/theadmin/TheAdmin.prod.js", "~/TheAdmin/js/theadmin/TheAdmin.js")
.SetVersion("1.0.0");

_manifest
.DefineScript("admin-main")
.SetUrl("~/TheAdmin/js/theadmin-main/TheAdmin-main.js")
.SetUrl(
"~/TheAdmin/js/theadmin-main/TheAdmin-main.prod.js",
"~/TheAdmin/js/theadmin-main/TheAdmin-main.js"
)
.SetDependencies("theme-head", "js-cookie")
.SetVersion("1.0.0");

Expand Down
12 changes: 12 additions & 0 deletions src/docs/guides/assets-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ Parcel bundleEntrypoint parameter:
]
```

#### Sourcemaps

For javascript files Parcel will create a .prod.js file for you along with a .map file. The .prod.js is created for use in production as it doesn't reference the .map file. Using the ResourceManagementOptionsConfiguration you will want to set it this way:

```C#
_manifest
.DefineScript("admin")
.SetDependencies("bootstrap", "admin-main", "theme-manager", "jQuery", "Sortable")
.SetUrl("~/TheAdmin/js/theadmin/TheAdmin.prod.js", "~/TheAdmin/js/theadmin/TheAdmin.js")
.SetVersion("1.0.0");
```

### Vite

Vite bundler action will support any configuration. From bundling a vue app to compiling a simple library. It is working by configuration file. The asset management tool simply loads a vite.config.ts file based on the source folder that we instruct it to use from the Assets.json file.
Expand Down

0 comments on commit c15a9f6

Please sign in to comment.