Skip to content

Commit

Permalink
Update netlify.toml and build script
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-montalvo committed Aug 28, 2024
1 parent 78d7ddc commit 74efea9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Basic configuration for a Netlify deployment
[build]
publish = "" # Directory to publish
command = "./pr-preview.sh"
command = "npx respec -s index.html -o index.html --localhost; npx respec -s accname/index.html -o accname/index.html --localhost; npx respec -s core-aam/index.html -o core-aam/index.html --localhost; npx respec -s dpub-aam/index.html -o dpub-aam/index.html --localhost; npx respec -s dpub-aria/index.html -o dpub-aria/index.html --localhost; npx respec -s graphics-aam/index.html -o graphics-aam/index.html --localhost; npx respec -s graphics-aria/index.html -o graphics-aria/index.html --localhost; npx respec -s svg-aam/index.html -o svg-aam/index.html --localhost; npx respec -s mathml-aam/index.html -o mathml-aam/index.html --localhost"

[[redirects]]
from = "/*"
Expand All @@ -14,6 +14,8 @@

[context.deploy-preview]
NODE_ENV = "Deploy"
command = "./pr-preview.sh"

[context.branch-deploy.environment]
NODE_ENV = "development"
NODE_ENV = "development"
command = "./pr-preview.sh"
4 changes: 2 additions & 2 deletions pr-preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ find . -wholename "./index.html" -exec sed -i 's/ariaSpecURLs: {/ariaSpecURLs: {
find . -wholename "./index.html" -exec sed -i 's/accNameURLs: {/accNameURLs: {\n "unofficial": ".\/accname\/",/g' {} +
find . -wholename "./index.html" -exec sed -i 's/coreMappingURLs: {/coreMappingURLs: {\n "unofficial": ".\/core-aam\/",/g' {} +

# update specURLs mapping for child specs
echo "updating child spec mappings"
# update child specs URLs mapping
echo "updating child spec URL mappings"
# aria
find . -mindepth 1 -name "index.html" -exec sed -i 's/ariaSpecURLs: {/ariaSpecURLs: {\n "unofficial": "..\/",/g' {} +
# accname
Expand Down

0 comments on commit 74efea9

Please sign in to comment.