File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -39,19 +39,24 @@ jobs:
39
39
# Copy necessary files into the dist directory
40
40
Copy-Item -Recurse -Path "temp/*" -Destination "dist" -Force
41
41
42
- - name : List files in the dist directory after copying
43
- run : |
44
- Get-ChildItem dist
45
-
46
- - name : Update HTML files to include './' in src/href attributes
42
+ - name : Update paths in HTML and JS files
47
43
run : |
44
+ # Update paths in HTML files
48
45
Get-ChildItem dist\*.html | ForEach-Object {
49
- (Get-Content $_.FullName) -replace 'src="(/assets/)', 'src="./assets/' -replace 'href="(/assets/)', 'href="./assets/' | Set-Content $_.FullName
46
+ (Get-Content $_.FullName) `
47
+ -replace 'src="(/assets/)', 'src="./assets/' `
48
+ -replace 'href="(/assets/)', 'href="./assets/' | Set-Content $_.FullName
49
+ }
50
+
51
+ # Update paths in JS files inside the assets folder
52
+ Get-ChildItem dist\assets\*.js | ForEach-Object {
53
+ (Get-Content $_.FullName) `
54
+ -replace '("/assets/)', '("./assets/' | Set-Content $_.FullName
50
55
}
51
56
52
- - name : List updated HTML files
57
+ - name : List files in the dist directory after copying
53
58
run : |
54
- Get-ChildItem dist\*.html
59
+ Get-ChildItem dist
55
60
56
61
- name : Clear Electron Builder Cache
57
62
run : |
You can’t perform that action at this time.
0 commit comments