Skip to content

Commit

Permalink
fix build 2
Browse files Browse the repository at this point in the history
  • Loading branch information
oleole39 committed Nov 27, 2024
1 parent ee3a7e0 commit c877b02
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ pushd "$build_folder"
sed -i 's/jsoncrack.com/__YNH_DOMAIN____YNH_SUBDIR_PATH__/g' "./src/constants/seo.ts"
sed -i 's/"\/manifest.json"/"\/__YNH_SUBDIR_PATH__\/manifest.json"/g' "./src/constants/seo.ts"
sed -i 's/"\/favicon.ico"/"\/__YNH_SUBDIR_PATH__\/favicon.ico"/g' "./src/constants/seo.ts"
sed -i 's/Link href="\/"/Link href="\/editor"/g' "./src/layout/JsonCrackLogo.tsx"
sed -i 's@\"/assets@\"__YNH_SUBDIR_PATH__/assets@g' "./src/containers/Editor/components/LiveEditor.tsx"
sed -i 's@\"/assets@\"__YNH_SUBDIR_PATH__/assets@g' "./src/containers/Editor/components/views/GraphView/index.tsx"
sed -i 's@\"/assets@\"__YNH_SUBDIR_PATH__/assets@g' "./src/pages/widget.tsx"

#~ sed -i 's/url("\/assets\/cursor.svg")/url("\/__YNH_SUBDIR_PATH__\/assets\/cursor.svg")/g' "./src/containers/Editor/components/LiveEditor.tsx"
#~ sed -i 's/url("\/assets\/cursor.svg")/url("\/__YNH_SUBDIR_PATH__\/assets\/cursor.svg")/g' "./src/containers/Editor/components/views/GraphView/index.tsx"
#~ sed -i 's/Link href="\/"/Link href="\/__YNH_SUBDIR_PATH__"/g' "./src/layout/JsonCrackLogo.tsx"
sed -i 's/Link href="\/"/Link href="\/"/g' "./src/layout/JsonCrackLogo.tsx"
#~ sed -i 's/src="\/assets/src="\/__YNH_SUBDIR_PATH__\/assets/g' "./src/pages/widget.tsx"
grep -rli '"/assets' "./src" | xargs sed - i 's/"\/assets/"__YNH_SUBDIR_PATH__\/assets/g'

# Adapt text for YNH context
sed -i 's/jsoncrack.com/JSON_graph/g' "./src/containers/Modals/DownloadModal/index.tsx" # Default download filename
sed -i '/already notified/d' "./src/pages/_error.tsx" # Delete deceptive speech now Sentry is going to be disabled
Expand Down

0 comments on commit c877b02

Please sign in to comment.