Skip to content

Commit

Permalink
chore: update build scripts for next 14 (#3922)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoopDog committed Feb 26, 2024
1 parent 082002f commit c6cdc92
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 35 deletions.
4 changes: 2 additions & 2 deletions explorer/cc-anvil-catalog-dev-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rm -rf ./out
echo \"Deleting ./build/\"
rm -rf ./build

n 16.15.1
n 20.10.0
npm ci
export NEXT_PUBLIC_BASE_PATH="/data"

Expand All @@ -15,7 +15,7 @@ mkdir -p build/data
# Build AnVIL
rm -rf ./out
npm run build-dev:anvil-catalog
mv out/data/* build/data
mv out/* build/data

export BUCKET=s3://uqc-anvil-portal.dev.data/
export SRCDIR=build/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -rf ./out
echo \"Deleting ./build/\"
rm -rf ./build

n 16.15.1
n 20.10.0
npm ci

mkdir -p build/explore/anvil-cmg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
2 changes: 1 addition & 1 deletion explorer/cc-ncpi-catalog-dev-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
2 changes: 1 addition & 1 deletion explorer/cgl-anvil-catalog-prod-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -rf ./out
echo \"Deleting ./build/\"
rm -rf ./build

n 16.15.1
n 20.10.0
npm ci
export NEXT_PUBLIC_BASE_PATH="/data"

Expand Down
2 changes: 1 addition & 1 deletion explorer/cgl-anvil-dev-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rm -rf ./out
echo \"Deleting ./build/\"
rm -rf ./build

n 16.15.1
n 20.10.0
npm ci

#./insert-gtm-snippet.sh
Expand Down
2 changes: 1 addition & 1 deletion explorer/cgl-data-browser.dev.lungmap.net-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
2 changes: 1 addition & 1 deletion explorer/cgl-data-browser.lungmap.net-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
2 changes: 1 addition & 1 deletion explorer/cgl-explore.data.humancellatlas.org-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
2 changes: 1 addition & 1 deletion explorer/cgl-ncpi-catalog-prod-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
echo \"Deleting ./out/\"
rm -rf ./out

n 16.15.1
n 20.10.0
npm ci

# Build
Expand Down
1 change: 1 addition & 0 deletions explorer/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default withPlugins([withMDX], {
images: {
unoptimized: true,
},
output: "export",
reactStrictMode: true,
webpack: (config) => {
config.module = {
Expand Down
26 changes: 12 additions & 14 deletions explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@
"private": true,
"scripts": {
"dev:ncpi-catalog": "./scripts/dev.sh ncpi-catalog dev && next dev",
"build-dev:ncpi-catalog": "scripts/common-build.sh ncpi-catalog dev && next build && next export -o out && npm run postbuild",
"build-prod:ncpi-catalog": "./scripts/common-build.sh ncpi-catalog prod && next build && next export -o out && npm run postbuild",
"build-dev:ncpi-catalog": "scripts/common-build.sh ncpi-catalog dev && next build out && npm run postbuild",
"build-prod:ncpi-catalog": "./scripts/common-build.sh ncpi-catalog prod && next build && npm run postbuild",
"dev:anvil-catalog": "./scripts/dev.sh anvil-catalog dev && next dev",
"build-dev:anvil-catalog": "scripts/common-build.sh anvil-catalog dev && next build && next export -o out/data && npm run postbuild",
"build-dev:anvil-catalog": "scripts/common-build.sh anvil-catalog dev && next build && npm run postbuild",
"build-prod:anvil-catalog": "./scripts/common-build.sh anvil-catalog prod && next build && next export -o out/data && npm run postbuild",
"dev:lungmap": "./scripts/dev.sh lungmap dev && next dev",
"build-dev:lungmap": "./scripts/common-build.sh lungmap dev && next build && next export -o out && npm run postbuild",
"build-prod:lungmap": "./scripts/common-build.sh lungmap prod && next build && next export -o out && npm run postbuild",
"dev:anvil": "./scripts/dev.sh anvil dev && next dev",
"build:anvil": "./scripts/build.sh anvil && next build && next export -o out/explore && npm run postbuild",
"build-dev:lungmap": "./scripts/common-build.sh lungmap dev && next build && npm run postbuild",
"build-prod:lungmap": "./scripts/common-build.sh lungmap prod && next build && npm run postbuild",
"dev:anvil-cmg": "./scripts/dev.sh anvil-cmg dev && next dev",
"build:anvil-cmg": "./scripts/build.sh anvil-cmg && next build && next export -o out && npm run postbuild",
"build-cc-dev:anvil-cmg": "./scripts/common-build.sh anvil-cmg cc-dev && next build && next export -o out && npm run postbuild",
"build:anvil-cmg": "./scripts/build.sh anvil-cmg && next build && npm run postbuild",
"build-cc-dev:anvil-cmg": "./scripts/common-build.sh anvil-cmg cc-dev && next build && npm run postbuild",
"dev:hca-dcp": "./scripts/dev.sh hca-dcp dev && next dev",
"dev:cc-ma-dev:hca-dcp": "./scripts/dev.sh hca-dcp cc-ma-dev && next dev",
"build-dev:hca-dcp": "./scripts/common-build.sh hca-dcp dev && next build && next export -o out && npm run postbuild",
"build-cc-ma-dev:hca-dcp": "./scripts/common-build.sh hca-dcp cc-ma-dev && next build && next export -o out && npm run postbuild",
"build-ma-dev:hca-dcp": "./scripts/common-build.sh hca-dcp ma-dev && next build && next export -o out && npm run postbuild",
"build-ma-prod:hca-dcp": "./scripts/common-build.sh hca-dcp ma-prod && next build && next export -o out && npm run postbuild",
"build-prod:hca-dcp": "./scripts/build.sh hca-dcp prod && next build && next export -o out && npm run postbuild",
"build-dev:hca-dcp": "./scripts/common-build.sh hca-dcp dev && next build && npm run postbuild",
"build-cc-ma-dev:hca-dcp": "./scripts/common-build.sh hca-dcp cc-ma-dev && next build && npm run postbuild",
"build-ma-dev:hca-dcp": "./scripts/common-build.sh hca-dcp ma-dev && next build && npm run postbuild",
"build-ma-prod:hca-dcp": "./scripts/common-build.sh hca-dcp ma-prod && next build && npm run postbuild",
"build-prod:hca-dcp": "./scripts/build.sh hca-dcp prod && next build && npm run postbuild",
"postbuild": "next-sitemap --config next-sitemap.config.mjs",
"start": "npx serve out",
"lint": "next lint --dir .",
Expand Down
2 changes: 1 addition & 1 deletion explorer/pages/[entityListType]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
},
}));
return {
fallback: true, //TODO should this not be false? We have no server...
fallback: false,
paths,
};
};
Expand Down
6 changes: 1 addition & 5 deletions explorer/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Document, { Head, Html, Main, NextScript } from "next/document";
import Script from "next/script";

class MyDocument extends Document {
render(): JSX.Element {
Expand All @@ -12,10 +11,7 @@ class MyDocument extends Document {
an a later version. */}
{/* TODO self host fonts */}
{/* TODO only load fonts required for the app being built */}
<Script
src="https://accounts.google.com/gsi/client"
strategy="beforeInteractive"
></Script>
<script src="https://accounts.google.com/gsi/client" defer></script>
<link rel="stylesheet" href="https://use.typekit.net/qhb0geh.css" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Roboto+Mono&display=swap"
Expand Down

0 comments on commit c6cdc92

Please sign in to comment.