Unverified Commit 44e234e9 authored by Andy's avatar Andy Committed by GitHub

Remove `builds` from examples (#10417)

* Remove `builds` from examples

* Fix with-zones example

* Run prettier on now.json
parent 909ab3b1
{ {
"version": 2,
"name": "nextjs-blog-starter", "name": "nextjs-blog-starter",
"alias": ["nextjs-blog-starter.now.sh"], "alias": ["nextjs-blog-starter.now.sh"],
"builds": [{ "src": "package.json", "use": "@now/next" }],
"routes": [ "routes": [
{ "src": "/feed.json", "dest": "/_next/static/feed.json" }, { "src": "/feed.json", "dest": "/_next/static/feed.json" },
{ "src": "/blog/(?<page>[^/]+)$", "dest": "/blog?page=$page" } { "src": "/blog/(?<page>[^/]+)$", "dest": "/blog?page=$page" }
......
{ {
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@now/next"
}
],
"build": { "build": {
"env": { "env": {
"SECRET": "@my-secret-key", "SECRET": "@my-secret-key",
......
...@@ -47,6 +47,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit. ...@@ -47,6 +47,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.
now now
``` ```
> Choose `packages/web-app` as root directory when deploying.
## The idea behind the example ## The idea behind the example
Stencil is a compiler that generates Web Components (more specifically, Custom Elements). Stencil combines the best concepts of the most popular frameworks into a simple build-time tool. Stencil is a compiler that generates Web Components (more specifically, Custom Elements). Stencil combines the best concepts of the most popular frameworks into a simple build-time tool.
......
{
"version": 2,
"builds": [{ "src": "packages/web-app/package.json", "use": "@now/next" }],
"routes": [{ "src": "(.*)", "dest": "packages/web-app$1", "continue": true }]
}
...@@ -48,6 +48,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit. ...@@ -48,6 +48,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.
now now
``` ```
> Choose `packages/web-app` as root directory when deploying.
## Useful Links ## Useful Links
- [Documentation](https://yarnpkg.com/en/docs/workspaces) - [Documentation](https://yarnpkg.com/en/docs/workspaces)
......
{
"version": 2,
"builds": [{ "src": "packages/web-app/package.json", "use": "@now/next" }],
"routes": [{ "src": "(.*)", "dest": "packages/web-app$1", "continue": true }]
}
.next .next
node_modules node_modules
.now
\ No newline at end of file
{
"build": {
"env": {
"BUILDING_FOR_NOW": "true"
}
},
"rewrites": [
{
"source": "/blog/_next$1",
"destination": "/_next$1"
}
]
}
.next .next
node_modules node_modules
.now
\ No newline at end of file
{
"rewrites": [
{
"source": "/blog(.*)",
"destination": "https://with-zones-blog.now.sh$1"
}
]
}
{
"name": "with-zones",
"version": 2,
"builds": [
{ "src": "blog/next.config.js", "use": "@now/next" },
{ "src": "home/next.config.js", "use": "@now/next" }
],
"routes": [
{ "src": "/blog/(_next|static)(.*)" },
{ "src": "/blog(.*)", "dest": "blog/blog$1", "continue": true },
{ "src": "(?!/?blog)(.*)", "dest": "home$1", "continue": true }
],
"build": {
"env": {
"BUILDING_FOR_NOW": "true"
}
}
}
{
"builds": [{ "src": "package.json", "use": "@now/next@canary" }]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment