Skip to content

Commit

Permalink
fix(stark-demo): add missing files and regex to the showcase url auto…
Browse files Browse the repository at this point in the history
…-replace script

ISSUES CLOSED: #571
  • Loading branch information
christophercr committed Jul 31, 2018
1 parent 4231b9c commit 3db3270
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions showcase/ghpages-adapt-bundle-urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ let path = require("path");
const filesToChange = [
/index.html/,
/main.*\.css$/,
/main.*\.js$/,
/main.*\.js\.map$/,
/runtime~main.*\.js$/,
/runtime~main.*\.js\.map$/,
/runtime~polyfills.*\.js$/,
Expand All @@ -24,10 +26,10 @@ let urlWithTrailingSlash = deployDir.endsWith("/") ? deployDir : deployDir + "/"
let urlWithoutTrailingSlash = deployDir.endsWith("/") ? deployDir.substring(0, deployDir.length - 1) : deployDir;

let replacements = [
{ searchValue: `/${baseHrefPlaceholder}/${deployUrlPlaceholder}/`, replaceValue: urlWithTrailingSlash },
{ searchValue: `"${baseHrefPlaceholder}"`, replaceValue: `"${urlWithTrailingSlash}"` },
{ searchValue: `"${deployUrlPlaceholder}"`, replaceValue: `"${urlWithoutTrailingSlash}"` },
{ searchValue: `"${deployUrlPlaceholder}/`, replaceValue: `"${urlWithTrailingSlash}` },
{ searchValue: `/${baseHrefPlaceholder}/${deployUrlPlaceholder}/`, replaceValue: urlWithTrailingSlash }
{ searchValue: `${deployUrlPlaceholder}`, replaceValue: urlWithoutTrailingSlash }
];

// if the 3rd param is given (oldDeployDir) then it will be appended to the "showcase" folder and replaced by the new deployDir
Expand Down

0 comments on commit 3db3270

Please sign in to comment.