Skip to content

Commit d5eae31

Browse files
committed
chore: move to paths relative to monorepo root for new monorepo support
1 parent 112bb9f commit d5eae31

File tree

12 files changed

+43
-42
lines changed

12 files changed

+43
-42
lines changed

demos/base-path/netlify.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
2+
command = "npm run build -w demos/base-path"
3+
publish = "demos/base-path/.next"
44
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
55

66
[build.environment]
77
# cache Cypress binary in local "node_modules" folder
88
# so Netlify caches it
9-
CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
9+
CYPRESS_CACHE_FOLDER = "node_modules/.CypressBinary"
1010

1111
[[plugins]]
1212
package = "@netlify/plugin-nextjs"
@@ -16,4 +16,4 @@ package = "@netlify/plugin-nextjs"
1616
package = "@netlify/plugin-local-install-core"
1717

1818
[[plugins]]
19-
package = "../plugin-wrapper"
19+
package = "demos/plugin-wrapper"

demos/canary/netlify.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
2+
command = "npm run build -w demos/canary"
3+
publish = "demos/canary/.next"
44
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
55

66
[build.environment]
@@ -15,4 +15,4 @@ package = "@netlify/plugin-nextjs"
1515
package = "@netlify/plugin-local-install-core"
1616

1717
[[plugins]]
18-
package = "../plugin-wrapper"
18+
package = "demos/plugin-wrapper"

demos/custom-routes/netlify.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
2+
command = "npm run build -w demos/custom-routes"
3+
publish = "demos/custom-routes/.next"
44
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
55

66
[[plugins]]
@@ -11,4 +11,4 @@ package = "@netlify/plugin-nextjs"
1111
package = "@netlify/plugin-local-install-core"
1212

1313
[[plugins]]
14-
package = "../plugin-wrapper"
14+
package = "demos/plugin-wrapper"

demos/default/netlify.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
2+
command = "npm run build -w demos/default"
3+
publish = "demos/default/.next"
4+
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"
55

66
[build.environment]
77
# cache Cypress binary in local "node_modules" folder
88
# so Netlify caches it
9-
CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
9+
CYPRESS_CACHE_FOLDER = "node_modules/.CypressBinary"
1010
# set TERM variable for terminal output
1111
TERM = "xterm"
1212
NODE_VERSION = "16.15.1"
@@ -28,4 +28,4 @@ package = "@netlify/plugin-nextjs"
2828
package = "@netlify/plugin-local-install-core"
2929

3030
[[plugins]]
31-
package = "../plugin-wrapper"
31+
package = "demos/plugin-wrapper"

demos/middleware/netlify.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
2-
command = "npm run build"
3-
publish = ".next"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
2+
command = "npm run build -w demos/middleware"
3+
publish = "demos/middleware/.next"
4+
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"
55

66
[build.environment]
77
NEXT_SPLIT_API_ROUTES = "true"
@@ -15,7 +15,7 @@ package = "@netlify/plugin-nextjs"
1515
package = "@netlify/plugin-local-install-core"
1616

1717
[[plugins]]
18-
package = "../plugin-wrapper"
18+
package = "demos/plugin-wrapper"
1919
# Uncomment this if testing the built files rather than dev
2020
# [dev]
2121
# framework = "#static"

demos/next-auth/netlify.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
2+
command = "npm run build -w demos/next-auth"
3+
publish = "demos/next-auth/.next"
4+
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"
55

66
[build.environment]
77
TERM = "xterm"
@@ -14,4 +14,4 @@ package = "@netlify/plugin-nextjs"
1414
package = "@netlify/plugin-local-install-core"
1515

1616
[[plugins]]
17-
package = "../plugin-wrapper"
17+
package = "demos/plugin-wrapper"

demos/next-export/netlify.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
2-
command = "next build && next export"
3-
publish = "out"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
2+
command = "npm run build -w demos/next-export"
3+
publish = "demos/next-export/out"
4+
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"
55

66
[build.environment]
77
NETLIFY_NEXT_PLUGIN_SKIP = "true"
@@ -14,4 +14,4 @@ package = "@netlify/plugin-nextjs"
1414
package = "@netlify/plugin-local-install-core"
1515

1616
[[plugins]]
17-
package = "../plugin-wrapper"
17+
package = "demos/plugin-wrapper"

demos/next-export/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"typescript": "^4.6.3"
1818
},
1919
"scripts": {
20+
"build": "next build && next export",
2021
"test": "echo \"Error: no test specified\" && exit 1"
2122
},
2223
"repository": {

demos/next-i18next/netlify.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
2+
command = "npm run build -w demos/next-i18next"
3+
publish = "demos/next-i18next/.next"
4+
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"
55

66
[[plugins]]
77
package = "@netlify/plugin-nextjs"
@@ -11,4 +11,4 @@ package = "@netlify/plugin-nextjs"
1111
package = "@netlify/plugin-local-install-core"
1212

1313
[[plugins]]
14-
package = "../plugin-wrapper"
14+
package = "demos/plugin-wrapper"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
2+
command = "npm run build -w demos/next-with-edge-functions"
3+
publish = "demos/next-with-edge-functions/.next"
44

55
[[plugins]]
66
package = "@netlify/plugin-nextjs"
@@ -10,4 +10,4 @@ package = "@netlify/plugin-nextjs"
1010
package = "@netlify/plugin-local-install-core"
1111

1212
[[plugins]]
13-
package = "../plugin-wrapper"
13+
package = "demos/plugin-wrapper"

demos/nx-next-monorepo-demo/netlify.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[build]
2-
command = "npm run build"
2+
command = "npm run build -w demos/nx-next-monorepo-demo"
33
publish = "dist/apps/demo-monorepo/.next"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
4+
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"
55

66
[build.environment]
77
NEXT_SPLIT_API_ROUTES = "true"
88
NEXT_BUNDLE_BASED_ON_NFT_FILES = "true"
99

1010
[dev]
11-
command = "npm run start"
11+
command = "npm run start -w demos/nx-next-monorepo-demo"
1212
targetPort = 4200
1313

1414
[[plugins]]
15-
package = "../plugin-wrapper"
15+
package = "demos/plugin-wrapper"
1616

1717
[[plugins]]
1818
package = "@netlify/plugin-nextjs"

demos/static-root/netlify.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
2-
command = "next build"
3-
publish = ".next"
4-
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
2+
command = "npm run build -w demos/static-root"
3+
publish = "demos/static-root/.next"
4+
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"
55

66
[build.environment]
77
NEXT_SPLIT_API_ROUTES = "true"
@@ -15,4 +15,4 @@ package = "@netlify/plugin-nextjs"
1515
package = "@netlify/plugin-local-install-core"
1616

1717
[[plugins]]
18-
package = "../plugin-wrapper"
18+
package = "demos/plugin-wrapper"

0 commit comments

Comments
 (0)