Compare commits

..

1 Commits

Author SHA1 Message Date
Nathan Rajlich
f0380b98ff Publish Canary
- @vercel/frameworks@0.0.15-canary.0
 - @vercel/build-utils@2.3.2-canary.1
 - vercel@19.0.2-canary.3
 - @vercel/node@1.6.2-canary.1
2020-05-14 11:06:29 -07:00
318 changed files with 37977 additions and 44682 deletions

8
.github/CODEOWNERS vendored
View File

@@ -19,9 +19,9 @@
/packages/now-ruby @styfle @coetry @nathancahill
/packages/now-static-build @styfle @AndyBitz
/packages/now-routing-utils @styfle @dav-is @ijjk
/examples @mcsdevv @timothyis
/examples @msweeneydev @timothyis
/examples/create-react-app @Timer
/examples/nextjs @timneutkens
/examples/hugo @mcsdevv @timothyis @styfle
/examples/jekyll @mcsdevv @timothyis @sarupbanskota
/examples/zola @mcsdevv @timothyis @styfle
/examples/hugo @msweeneydev @timothyis @styfle
/examples/jekyll @msweeneydev @timothyis @sarupbanskota
/examples/zola @msweeneydev @timothyis @styfle

View File

@@ -1,6 +1,6 @@
# Contributing
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/zeit/now/discussions/new) with the owners of this repository before submitting a Pull Request.
Please read our [code of conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
@@ -11,7 +11,7 @@ This project is configured in a monorepo pattern where one repo contains multipl
To get started, execute the following:
```
git clone https://github.com/vercel/vercel
git clone https://github.com/zeit/now
yarn install
yarn bootstrap
yarn build
@@ -82,24 +82,24 @@ trace(['path/to/entrypoint.js'], {
.then(e => console.error(e));
```
When you run this script, you'll see all imported files. If anything file is missing, the bug is in [@zeit/node-file-trace](https://github.com/vercel/node-file-trace) and not the Builder.
When you run this script, you'll see all imported files. If anything file is missing, the bug is in [@zeit/node-file-trace](https://github.com/zeit/node-file-trace) and not the Builder.
## Deploy a Builder with existing project
Sometimes you want to test changes to a Builder against an existing project, maybe with `vercel dev` or an actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.
Sometimes you want to test changes to a Builder against an existing project, maybe with `now dev` or an actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.
1. Change directory to the desired Builder `cd ./packages/now-node`
2. Run `yarn build` to compile typescript and other build steps
3. Run `npm pack` to create a tarball file
4. Run `vercel *.tgz` to upload the tarball file and get a URL
4. Run `now *.tgz` to upload the tarball file and get a URL
5. Edit any existing `vercel.json` project and replace `use` with the URL
6. Run `vercel` or `vercel dev` to deploy with the experimental Builder
6. Run `now` or `now dev` to deploy with the experimental Builder
## Add a New Framework
You can add support for a new Framework by creating a Pull Request for this repository and following the steps below:
1. Add the Framework to the `@vercel/frameworks` package: The file is located in `./packages/frameworks/frameworks.json`. You can copy the structure of an existing one and adjust the required fields. Note that the `settings` property either contains a `value` or a `placeholder`. The `value` property is used when something is not configurable, the `placeholder` is used when something is configurable and can be changed with configuration. An example would be the Output Directory for Hugo, it's `public` by default but can be changed through its config file, so we use `placeholder` with an explanation of what can be used.
2. Add an example to the `./examples` directory: The name of the directory should equal the slug of the framework used in `@vercel/frameworks`. The `.github/EXAMPLE_README_TEMPLATE.md` file can be used to create a `README.md` file for the example.
3. Update the `@vercel/static-build` package: The file `./packages/now-static-build/src/frameworks.ts` has to be extended. You can add default routes that will always be applied to projects that use this Framework or specify some paths that will be cached to speed up the build process.
1. Add the Framework to the `@now/frameworks` package: The file is located in `packages/frameworks/frameworks.json`. You can copy the structure of an existing one and adjust the required fields. Note that the `settings` property either contains a `value` or a `placeholder`. The `value` property is used when something is not configurable, the `placeholder` is used when something is configurable and can be changed with configuration. An example would be the Output Directory for Hugo, it's `public` by default but can be changed through its config file, so we use `placeholder` with an explanation of what can be used.
2. Add an example to the `examples/` directory: The name of the directory should equal the slug of the framework used in `@now/frameworks`. The `.github/EXAMPLE_README_TEMPLATE.md` file can be used to create a `README.md` file for the example.
3. Update the `@now/static-build` package: The file `packages/now-static-build/src/frameworks.ts` has to be extended. You can add default routes that will always be applied to projects that use this Framework or specify some paths that will be cached to speed up the build process.
4. After your Pull Request has been merged and released, other users can select the example on the Vercel dashboard and deploy it.

View File

@@ -6,14 +6,14 @@ This directory is a brief example of a [Name](site-link) site that can be deploy
Deploy your own [Name] project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/example-directory)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now-examples/tree/master/example-directory)
### How We Created This Example
To get started with [Name] on Vercel, you can use the [CLI Tool Used](CLI-link) to initialize the project:
```shell
$ vercel init [Name]]
$ now init charge
```
### Deploying From Your Terminal
@@ -21,5 +21,5 @@ $ vercel init [Name]]
Once initialized, you can deploy the [Name] example with just a single command:
```shell
$ vercel
$ now
```

View File

@@ -4,8 +4,8 @@ contact_links:
url: https://vercel.com/support/request
about: Report a bug using the Vercel support form
- name: Feature Request
url: https://github.com/vercel/vercel/discussions/new?category_id=66161
about: Share ideas for new features
url: https://github.com/zeit/now/discussions/new
about: Request a feature to be added to the platform
- name: Ask a Question
url: https://github.com/vercel/vercel/discussions/new?category_id=66160
about: Ask the community for help
url: https://github.com/zeit/now/discussions/new
about: Ask questions and discuss with other community members

View File

@@ -9,10 +9,10 @@ jobs:
cancel:
name: 'Cancel Previous Runs'
runs-on: ubuntu-latest
timeout-minutes: 2
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.3.2
- uses: styfle/cancel-workflow-action@0.3.1
with:
workflow_id: 849295, 849296, 849297, 849298
access_token: ${{ github.token }}
access_token: ${{ secrets.GITHUB_WORKFLOW_TOKEN }}

View File

@@ -29,5 +29,5 @@ jobs:
node-version: ${{ matrix.node }}
- run: yarn test-integration-cli --clean false
env:
VERCEL_TEAM_TOKEN: ${{ secrets.VERCEL_TEAM_TOKEN }}
VERCEL_REGISTRATION_URL: ${{ secrets.VERCEL_REGISTRATION_URL }}
ZEIT_TEAM_TOKEN: ${{ secrets.ZEIT_TEAM_TOKEN }}
ZEIT_REGISTRATION_URL: ${{ secrets.ZEIT_REGISTRATION_URL }}

View File

@@ -32,5 +32,5 @@ jobs:
node-version: ${{ matrix.node }}
- run: yarn test-integration-dev --clean false
env:
VERCEL_TEAM_TOKEN: ${{ secrets.VERCEL_TEAM_TOKEN }}
VERCEL_REGISTRATION_URL: ${{ secrets.VERCEL_REGISTRATION_URL }}
ZEIT_TEAM_TOKEN: ${{ secrets.ZEIT_TEAM_TOKEN }}
ZEIT_REGISTRATION_URL: ${{ secrets.ZEIT_REGISTRATION_URL }}

View File

@@ -21,5 +21,5 @@ jobs:
- run: yarn run build
- run: yarn test-integration-once --clean false
env:
VERCEL_TEAM_TOKEN: ${{ secrets.VERCEL_TEAM_TOKEN }}
VERCEL_REGISTRATION_URL: ${{ secrets.VERCEL_REGISTRATION_URL }}
ZEIT_TEAM_TOKEN: ${{ secrets.ZEIT_TEAM_TOKEN }}
ZEIT_REGISTRATION_URL: ${{ secrets.ZEIT_REGISTRATION_URL }}

1
.gitignore vendored
View File

@@ -27,4 +27,3 @@ test/lib/deployment/failed-page.txt
/.env
/public
__pycache__
.vercel

View File

@@ -32,7 +32,7 @@ export analyze({
If you are using TypeScript, you should use the following types:
```ts
import { AnalyzeOptions } from '@vercel/build-utils'
import { AnalyzeOptions } from '@now/build-utils'
export analyze(options: AnalyzeOptions) {
return 'fingerprint goes here'
@@ -67,7 +67,7 @@ build({
If you are using TypeScript, you should use the following types:
```ts
import { BuildOptions } from '@vercel/build-utils'
import { BuildOptions } from '@now/build-utils'
export build(options: BuildOptions) {
// Build the code here
@@ -100,7 +100,7 @@ prepareCache({
If you are using TypeScript, you can import the types for each of these functions by using the following:
```ts
import { PrepareCacheOptions } from '@vercel/build-utils'
import { PrepareCacheOptions } from '@now/build-utils'
export prepareCache(options: PrepareCacheOptions) {
return { 'path-to-file': File }
@@ -109,7 +109,7 @@ export prepareCache(options: PrepareCacheOptions) {
### `shouldServe`
An **optional** exported function that is only used by `vercel dev` in [Vercel CLI](https:///download) and indicates whether a [Runtime](https://vercel.com/docs/runtimes) wants to be responsible for building a certain request path.
An **optional** exported function that is only used by `now dev` in [Now CLI](https:///download) and indicates whether a [Runtime](https://vercel.com/docs/runtimes) wants to be responsible for building a certain request path.
```js
shouldServe({
@@ -124,14 +124,14 @@ shouldServe({
If you are using TypeScript, you can import the types for each of these functions by using the following:
```ts
import { ShouldServeOptions } from '@vercel/build-utils'
import { ShouldServeOptions } from '@now/build-utils'
export shouldServe(options: ShouldServeOptions) {
return Boolean
}
```
If this method is not defined, Vercel CLI will default to [this function](https://github.com/vercel/vercel/blob/52994bfe26c5f4f179bdb49783ee57ce19334631/packages/now-build-utils/src/should-serve.ts).
If this method is not defined, Now CLI will default to [this function](https://github.com/zeit/now/blob/52994bfe26c5f4f179bdb49783ee57ce19334631/packages/now-build-utils/src/should-serve.ts).
### Runtime Options
@@ -147,7 +147,7 @@ The exported functions [`analyze`](#analyze), [`build`](#build), and [`prepareCa
## Examples
Check out our [Node.js Runtime](https://github.com/vercel/vercel/tree/master/packages/now-node), [Go Runtime](https://github.com/vercel/vercel/tree/master/packages/now-go), [Python Runtime](https://github.com/vercel/vercel/tree/master/packages/now-python) or [Ruby Runtime](https://github.com/vercel/vercel/tree/master/packages/now-ruby) for examples of how to build one.
Check out our [Node.js Runtime](https://github.com/zeit/now/tree/master/packages/now-node), [Go Runtime](https://github.com/zeit/now/tree/master/packages/now-go), [Python Runtime](https://github.com/zeit/now/tree/master/packages/now-python) or [Ruby Runtime](https://github.com/zeit/now/tree/master/packages/now-ruby) for examples of how to build one.
## Technical Details
@@ -171,14 +171,14 @@ The env and secrets specified by the user as `build.env` are passed to the Runti
### Utilities as peerDependencies
When you publish your Runtime to npm, make sure to not specify `@vercel/build-utils` (as seen below in the API definitions) as a dependency, but rather as part of `peerDependencies`.
When you publish your Runtime to npm, make sure to not specify `@now/build-utils` (as seen below in the API definitions) as a dependency, but rather as part of `peerDependencies`.
## Types
### `Files`
```ts
import { File } from '@vercel/build-utils';
import { File } from '@now/build-utils';
type Files = { [filePath: string]: File };
```
@@ -200,7 +200,7 @@ An example of a valid output `Files` object is:
This is an abstract type that can be imported if you are using TypeScript.
```ts
import { File } from '@vercel/build-utils';
import { File } from '@now/build-utils';
```
Valid `File` types include:
@@ -212,7 +212,7 @@ Valid `File` types include:
### `FileRef`
```ts
import { FileRef } from '@vercel/build-utils';
import { FileRef } from '@now/build-utils';
```
This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) that represents an abstract file instance stored in our platform, based on the file identifier string (its checksum). When a `Files` object is passed as an input to `analyze` or `build`, all its values will be instances of `FileRef`.
@@ -229,7 +229,7 @@ This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaSc
### `FileFsRef`
```ts
import { FileFsRef } from '@vercel/build-utils';
import { FileFsRef } from '@now/build-utils';
```
This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) that represents an abstract instance of a file present in the filesystem that the build process is executing in.
@@ -247,7 +247,7 @@ This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaSc
### `FileBlob`
```ts
import { FileBlob } from '@vercel/build-utils';
import { FileBlob } from '@now/build-utils';
```
This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) that represents an abstract instance of a file present in memory.
@@ -265,7 +265,7 @@ This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaSc
### `Lambda`
```ts
import { Lambda } from '@vercel/build-utils';
import { Lambda } from '@now/build-utils';
```
This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), called a Serverless Function, that can be created by supplying `files`, `handler`, `runtime`, and `environment` as an object to the [`createLambda`](#createlambda) helper. The instances of this class should not be created directly. Instead, invoke the [`createLambda`](#createlambda) helper function.
@@ -293,20 +293,20 @@ This is an abstract enumeration type that is implemented by one of the following
## JavaScript API
The following is exposed by `@vercel/build-utils` to simplify the process of writing Runtimes, manipulating the file system, using the above types, etc.
The following is exposed by `@now/build-utils` to simplify the process of writing Runtimes, manipulating the file system, using the above types, etc.
### `createLambda`
Signature: `createLambda(Object spec) : Lambda`
```ts
import { createLambda } from '@vercel/build-utils';
import { createLambda } from '@now/build-utils';
```
Constructor for the [`Lambda`](#lambda) type.
```js
const { createLambda, FileBlob } = require('@vercel/build-utils');
const { createLambda, FileBlob } = require('@now/build-utils');
await createLambda({
runtime: 'nodejs8.10',
handler: 'index.main',
@@ -321,7 +321,7 @@ await createLambda({
Signature: `download() : Files`
```ts
import { download } from '@vercel/build-utils';
import { download } from '@now/build-utils';
```
This utility allows you to download the contents of a [`Files`](#files) data structure, therefore creating the filesystem represented in it.
@@ -339,7 +339,7 @@ await download(files, workPath, meta);
Signature: `glob() : Files`
```ts
import { glob } from '@vercel/build-utils';
import { glob } from '@now/build-utils';
```
This utility allows you to _scan_ the filesystem and return a [`Files`](#files) representation of the matched glob search string. It can be thought of as the reverse of [`download`](#download).
@@ -347,7 +347,7 @@ This utility allows you to _scan_ the filesystem and return a [`Files`](#files)
The following trivial example downloads everything to the filesystem, only to return it back (therefore just re-creating the passed-in [`Files`](#files)):
```js
const { glob, download } = require('@vercel/build-utils')
const { glob, download } = require('@now/build-utils')
exports.build = ({ files, workPath }) => {
await download(files, workPath)
@@ -360,7 +360,7 @@ exports.build = ({ files, workPath }) => {
Signature: `getWriteableDirectory() : String`
```ts
import { getWriteableDirectory } from '@vercel/build-utils';
import { getWriteableDirectory } from '@now/build-utils';
```
In some occasions, you might want to write to a temporary directory.
@@ -370,13 +370,13 @@ In some occasions, you might want to write to a temporary directory.
Signature: `rename(Files) : Files`
```ts
import { rename } from '@vercel/build-utils';
import { rename } from '@now/build-utils';
```
Renames the keys of the [`Files`](#files) object, which represent the paths. For example, to remove the `*.go` suffix you can use:
```js
const rename = require('@vercel/build-utils')
const rename = require('@now/build-utils')
const originalFiles = { 'one.go': fileFsRef1, 'two.go': fileFsRef2 }
const renamedFiles = rename(originalFiles, path => path.replace(/\.go$/, '')
```

View File

@@ -175,7 +175,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
END OF TERMS AND CONDITIONS
Copyright 2017 Vercel, Inc.
Copyright 2017 ZEIT, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@@ -1,18 +1,14 @@
<p align="center">
<a href="https://vercel.com">
<img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96">
<h3 align="center">Vercel</h3>
</a>
<img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96">
<h3 align="center">Vercel</h3>
<p align="center">Develop. Preview. Ship.</p>
</p>
[![CI Status](https://badgen.net/github/checks/vercel/vercel?label=CI)](https://github.com/vercel/vercel/actions?workflow=CI)
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/vercel/vercel/discussions)
[![CI Status](https://badgen.net/github/checks/zeit/now?label=CI)](https://github.com/zeit/now/actions?workflow=CI)
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/zeit/now/discussions)
## Usage
Vercel is the optimal workflow for frontend teams. All-in-one: Static and Jamstack deployment, Serverless Functions, and Global CDN.
Get started by [Importing a Git Project](https://vercel.com/import) and use `git push` to deploy. Alternatively, you can [install Vercel CLI](https://vercel.com/download).
## Documentation
@@ -31,4 +27,4 @@ As always, you should use `yarn test-unit` to run the tests and see if your chan
## How to Create a Release
If you have write access to this repository, you can read more about how to publish a release [here](https://github.com/vercel/vercel/wiki/Creating-a-Release).
If you have write access to this repository, you can read more about how to publish a release [here](https://github.com/zeit/now/wiki/Creating-a-Release).

View File

@@ -51,8 +51,7 @@ export async function getGitHubRepoInfo(repo: Repo) {
data.subdir = repo.path.slice(subdirPath.length).split('/');
}
if (data.id === 'vercel/vercel' && data.subdir && data.subdir[0] === 'examples') {
if (data.id === 'zeit/now' && data.subdir && data.subdir[0] === 'examples') {
// from our examples, add `homepage` and `description` fields
const example = data.subdir[1];
const exampleList = await getExampleList();

View File

@@ -45,8 +45,8 @@ export default withApiHandler(async function(req: NowRequest, res: NowResponse)
const example = segment.slice(0, -ext.length);
await extract('https://github.com/vercel/vercel/archive/master.zip', TMP_DIR);
const directory = `${TMP_DIR}/vercel-master/examples/${example}`;
await extract('https://github.com/zeit/now/archive/master.zip', TMP_DIR);
const directory = `${TMP_DIR}/now-master/examples/${example}`;
if (!isDirectory(directory)) {
return notFound(res, `Example '${example}' was not found.`);

View File

@@ -1,5 +1,5 @@
// A proxy to get the basic info of an existing github/gitlab repo:
// GET /info?repo=vercel/micro
// GET /info?repo=zeit/micro
// @ts-ignore
import parseGitUrl from 'parse-github-url';

View File

@@ -8,8 +8,8 @@ export default withApiHandler(async function(
req: NowRequest,
res: NowResponse
) {
await extract('https://github.com/vercel/vercel/archive/master.zip', '/tmp');
const exampleList = summary('/tmp/vercel-master/examples');
await extract('https://github.com/zeit/now/archive/master.zip', '/tmp');
const exampleList = summary('/tmp/now-master/examples');
const existingExamples = Array.from(exampleList).map(key => ({
name: key,

View File

@@ -2,7 +2,7 @@
"name": "api",
"private": true,
"version": "0.0.0",
"description": "API for the vercel/vercel repo",
"description": "API for the zeit/now repo",
"main": "index.js",
"scripts": {
"build": "yarn --cwd .. && node ../utils/run.js build all"

View File

@@ -33,5 +33,5 @@ When passing multiple `--regions` as a CLI parameter,
make sure they're separated by a comma (`,`). For example:
```console
vercel --regions sfo,bru,gru
now --regions sfo,bru,gru
```

View File

@@ -8,13 +8,13 @@ The domain you supplied cannot be verified using either the intended set of name
Apply the intended set of nameservers to your domain or add the given TXT verification record through your domain provider.
You can retrieve both the intended nameservers and TXT verification record for the domain you wish to verify by running `vercel domains inspect <domain>`.
You can retrieve both the intended nameservers and TXT verification record for the domain you wish to verify by running `now domains inspect <domain>`.
When you have added either verification method to your domain, you can run `vercel domains verify <domain>` again to complete verification for your domain.
When you have added either verification method to your domain, you can run `now domains verify <domain>` again to complete verification for your domain.
Vercel will also automatically check periodically that your domain has been verified and automatically mark it as such if we detect either verification method on the domain.
If you would not like to verify your domain, you can remove it from your account using `vercel domains rm <domain>`.
If you would not like to verify your domain, you can remove it from your account using `now domains rm <domain>`.
#### Resources

View File

@@ -9,9 +9,9 @@ You specified the `--env` or `-e` flag with the value of a secret. However, the
Make sure to specify the environment variable and secret like that:
```bash
vercel -e VARIABLE_NAME=@secret-name
now -e VARIABLE_NAME=@secret-name
```
In addition, ensure that the secret (`@secret-name` in the example above) exists in the current scope (the team or user account that you're using).
You can run `vercel switch` or `--scope` to switch to a different team or user.
You can run `now switch` or `--scope` to switch to a different team or user.

View File

@@ -6,4 +6,4 @@ You specified a path as the value for the `--dotenv` flag, but the target of the
#### Possible Ways to Fix It
Make sure the target file you've specified exists and is readable by Vercel CLI. In addition, please ensure that the filename starts with a dot (example: `.env`) - then it should work.
Make sure the target file you've specified exists and is readable by Now CLI. In addition, please ensure that the filename starts with a dot (example: `.env`) - then it should work.

View File

@@ -2,17 +2,17 @@
#### Why This Error Occurred
You ran `vercel dev` inside a project that contains a `vercel.json` file with `env` or `build.env` properties that use [Vercel Secrets](https://vercel.com/docs/v2/build-step#environment-variables).
You ran `now dev` inside a project that contains a `vercel.json` file with `env` or `build.env` properties that use [Now Secrets](https://vercel.com/docs/v2/build-step#environment-variables).
In order to use environment variables in your project locally that have values defined using the Vercel Secrets format (e.g. `@my-secret-value`), you will need to provide the value as an environment variable using a `.env`.
In order to use environment variables in your project locally that have values defined using the Now Secrets format (e.g. `@my-secret-value`), you will need to provide the value as an environment variable using a `.env` or `.env.build` file.
We require this to ensure your app works as you intend it to, in the development environment, and to provide you with a way to mirror or separate private environment variables within your applications, for example when connecting to a database.
We require this to ensure your app works as you intend it to, in the Now Dev environment, and to provide you with a way to mirror or separate private environment variables within your applications, for example when connecting to a database.
Read below for how to address this error.
#### Possible Ways to Fix It
The error message will list environment variables that are required and which file they are required to be included in `.env`.
The error message will list environment variables that are required and which file they are required to be included in (either `.env` or `.env.build`).
If the file does not exist yet, please create the file that the error message mentions and insert the missing environment variable into it.

View File

@@ -9,11 +9,11 @@ You specified the `--env` or `-e` flag and didn't add a name and value for the e
Make sure to set the name and value of the variable like this:
```bash
vercel -e VARIABLE_NAME="VALUE"
now -e VARIABLE_NAME="VALUE"
```
You can also specify a environment variable that contains a secret:
```bash
vercel -e VARIABLE_NAME=@secret-name
now -e VARIABLE_NAME=@secret-name
```

View File

@@ -8,4 +8,4 @@ The `--scope` flag was specified, but there's no value for it available.
In order to make it work, you need to specify a value for the `--scope` flag. This needs to be the slug or ID of the team as which you'd like to act or the username or ID of a user you'd like to act as.
As an example, if your team URL is `https://vercel.com/my-team`, you would set `--scope` to `my-team`.
As an example, if your team URL is `https://vercel.com/teams/zeit`, you would set `--scope` to `zeit`.

View File

@@ -1,14 +0,0 @@
# `@vercel/next` Functions Config Optimized Lambdas Opt-out
#### Why This Warning Occurred
`@vercel/next` by default now bundles pages into optimized functions, minimizing bootup time and increasing overall application throughput.
When the `functions` config is added in `now.json` or `vercel.json`, it causes conflicts with this optimization, so it is opted-out.
#### Possible Ways to Fix It
Remove the `functions` config from your `now.json` or `vercel.json` to take advantage of this optimization.
### Useful Links
- [Functions Config Documentation](https://vercel.com/docs/configuration?query=functions#project/functions)

View File

@@ -1,16 +0,0 @@
# `@vercel/next` Legacy Routes Optimized Lambdas Opt-out
#### Why This Warning Occurred
`@vercel/next` by default now bundles pages into optimized functions, minimizing bootup time and increasing overall application throughput.
When legacy `routes` are added in `now.json` or `vercel.json`, they cause conflicts with this optimization, so it is opted-out.
#### Possible Ways to Fix It
Migrate from using legacy `routes` to the new `rewrites`, `redirects`, and `headers` configurations in your `now.json` or `vercel.json` file or leverage them directly in your `next.config.js` with the built-in [custom routes support](https://github.com/zeit/next.js/issues/9081)
### Useful Links
- [Rewrites Documentation](https://vercel.com/docs/configuration?query=rewrites#project/rewrites)
- [Redirects Documentation](https://vercel.com/docs/configuration?query=rewrites#project/redirects)
- [Headers Documentation](https://vercel.com/docs/configuration?query=rewrites#project/headers)

View File

@@ -2,7 +2,7 @@
#### Why This Error Occurred
You're running Vercel CLI in a non-terminal context and there are no credentials available. This means that Vercel CLI is not able to authenticate against our service.
You're running Now CLI in a non-terminal context and there are no credentials available. This means that Now CLI is not able to authenticate against our service.
#### Possible Ways to Fix It

View File

@@ -2,10 +2,10 @@
#### Why This Error Occurred
You tried to run a command that doesn't allow the `--token` flag (like `vercel switch`). This is not allowed because commands like these are influencing the configuration files.
You tried to run a command that doesn't allow the `--token` flag (like `now switch`). This is not allowed because commands like these are influencing the configuration files.
In turn, they would have to take the value of the `--token` flag into consideration (which is not a good idea, because flags in Vercel CLI should never change the configuration).
In turn, they would have to take the value of the `--token` flag into consideration (which is not a good idea, because flags in Now CLI should never change the configuration).
#### Possible Ways to Fix It
Specify a value for the `--scope` flag. This needs to be the slug or ID of the team as which you'd like to act (as an example, if your team URL is `https://vercel.com/my-team`, the value can be `my-team`) or the username or ID of a user you'd like to act as.
Specify a value for the `--scope` flag. This needs to be the slug or ID of the team as which you'd like to act (as an example, if your team URL is `https://vercel.com/teams/zeit`, the value can be `zeit`) or the username or ID of a user you'd like to act as.

View File

@@ -1,8 +1,8 @@
# `vercel dev` as `dev` script
# `now dev` as `dev` script
#### Why This Error Occurred
The `package.json` file of the used project invokes `vercel dev` as `dev` script. This would cause `vercel dev` to recursively invoke itself.
The `package.json` file of the used project invokes `now dev` as `dev` script. This would cause `now dev` to recursively invoke itself.
#### Possible Ways to Fix It

View File

@@ -20,9 +20,9 @@ Legacy:
Serverless:
- Minimal lambda size of `49Kb` (approximately)
- Uses Next.js build targets (`target: 'serverless'`) in `next.config.js`. [documentation](https://github.com/vercel/next.js#summary)
- Uses Next.js build targets (`target: 'serverless'`) in `next.config.js`. [documentation](https://github.com/zeit/next.js#summary)
- Does not make changes to your application dependencies
- Does not load `next.config.js` ([as per the serverless target documentation](https://github.com/vercel/next.js#summary))
- Does not load `next.config.js` ([as per the serverless target documentation](https://github.com/zeit/next.js#summary))
- Runs `npm install`
- Runs `npm run now-build`
- Does not run `npm install --production` as the output from the build is all that's needed to bundle lambdas.
@@ -69,4 +69,4 @@ module.exports = {
### Useful Links
- [Serverless target implementation](https://github.com/vercel/now-builders/pull/150)
- [Serverless target implementation](https://github.com/zeit/now-builders/pull/150)

View File

@@ -2,15 +2,10 @@
#### Why This Error Occurred
This could be caused by a misconfigured "Build Command" or "Output Directory" for your Next.js project.
This could be caused by a failure during the build or an incorrect output directory being configured for your Next.js project.
#### Possible Ways to Fix It
In the Vercel dashboard, open your "Project Settings" and draw attention to "Build & Development Settings":
Check for any build errors in the logs and ensure that the output directory setting is either not changed or is pointing to the location of the `.next` output folder (`distDir`).
1. Ensure that the "Build Command" setting is not changed, or that it calls `next build`. If this command is not changed but you are seeing this error, double check that your `build` script in `package.json` calls `next build`.
2. Ensure that the "Output Directory" setting is not changed. This value almost never needs to be configured, and is only necessary if you override `distDir` in `next.config.js`.
3. For `next export` users: **do not override the "Output Directory"**. Next.js automatically detects what folder you outputted `next export` to.
In rare scenarios, this error message can also be caused by a Next.js build failure (if your "Build Command" accidentally returns an exit code that is not 0).
Double check for any error messages above the Routes Manifest error, which may provide additional details.
If you are running `next export` you should **not** need to customize the output directory to `out` since the builder automatically detects `next export` being run and uses the output from it.

View File

@@ -1,22 +1,22 @@
# `@vercel/static-build` Failed to detect a server running
# `@now/static-build` Failed to detect a server running
#### Why This Warning Occurred
When running `vercel dev`, the `@vercel/static-build` builder proxies relevant HTTP
requests to the server that is created by the `dev` script in the
When running `now dev`, the `@now/static-build` builder proxies relevant HTTP
requests to the server that is created by the `now-dev` script in the
`package.json` file.
In order for `vercel dev` to know which port the server is running on, the builder
In order for `now dev` to know which port the server is running on, the builder
is provided a `$PORT` environment variable that the server _must_ bind to. The
error "Failed to detect a server running on port" is printed if the builder fails
to detect a server listening on that specific port within five minutes.
#### Possible Ways to Fix It
Please ensure that your `dev` script binds the spawned development server on
Please ensure that your `now-dev` script binds the spawned development server on
the provided `$PORT` that the builder expects the server to bind to.
For example, if you are using Gatsby, your `dev` script must use the `-p`
For example, if you are using Gatsby, your `now-dev` script must use the `-p`
(port) option to bind to the `$PORT` specified from the builder:
> _In Windows environments, reference the `PORT` environment variable with `%PORT%`_
@@ -26,7 +26,7 @@ For example, if you are using Gatsby, your `dev` script must use the `-p`
...
"scripts": {
...
"dev": "gatsby develop -p $PORT"
"now-dev": "gatsby develop -p $PORT"
}
}
```

View File

@@ -2,7 +2,7 @@
#### Why This Error Occurred
You either tried to run Vercel CLI inside a directory that should never be deployed, or you specified a directory that should never be deployed like this: `vercel <directory>`.
You either tried to run Now CLI inside a directory that should never be deployed, or you specified a directory that should never be deployed like this: `now <directory>`.
#### Possible Ways to Fix It

View File

@@ -2,14 +2,14 @@
#### Why This Error Occurred
When supplying a region or DC identifier in `vercel scale`,
When supplying a region or DC identifier in `now scale`,
we weren't able to recognize the value as valid.
#### Possible Ways to Fix It
Check your `vercel scale` command make sure you are using a
Check your `now scale` command make sure you are using a
valid string after the URL. Regions
and DCs have to be in _lowercase_.
and DCs have to be in *lowercase*.
**Valid region identifiers**:
@@ -19,7 +19,7 @@ and DCs have to be in _lowercase_.
- `gru`
- `iad`
In Vercel CLI, they currently are transformed to
In `now-cli`, they currently are transformed to
DC identifiers before being sent to our APIs.
**Valid DC identifiers**:
@@ -32,5 +32,5 @@ DC identifiers before being sent to our APIs.
To pass multiple ones, use a comma:
```
vercel scale my-url-123.now.sh sfo,bru,gru 1 5
now scale my-url-123.now.sh sfo,bru,gru 1 5
```

View File

@@ -1,30 +1,31 @@
# `vercel scale ls` is deprecated
# `now scale ls` is deprecated
#### Why This Error Occurred
We have stopped supporting this command, in favor of
better alternatives.
`vercel scale ls` used to list all the scaling rules
`now scale ls` used to list all the scaling rules
for all your deployments. The output would be too long,
and it would often be hard to find the information
you needed in a long list of items.
#### Possible Ways to Fix It
Instead of using `vercel scale ls` to list all your deployments
and their scaling rules, first use `vercel ls` to find
Instead of using `now scale ls` to list all your deployments
and their scaling rules, first use `now ls` to find
your deployment:
```console
vercel ls
now ls
```
Then, select the URL of your deployment, which uniquely identifies it, and run:
```console
vercel inspect my-deployment-12345.now.sh
now inspect my-deployment-12345.now.sh
```
The `inspect` subcommand will give you your deployment's scale information, including what datacenters it's enabled on, the
current number of instances and minimums/maximums.

View File

@@ -2,11 +2,11 @@
#### Why This Error Occurred
You tried to use `vercel scale` on a path alias (`vercel alias -r rules.json`).
You tried to use `now scale` on a path alias (`now alias -r rules.json`).
#### Possible Ways to Fix It
Path aliases are routes to instances. Instances can be scaled independent from each other.
You can view path aliases by running `vercel alias ls <id>`.
You can view path aliases by running `now alias ls <id>`.
Documentation for Path Aliases can be found [here](https://vercel.com/docs/features/path-aliases).

View File

@@ -6,5 +6,5 @@ You specified the `--scope` flag and specified the ID or slug of a team that you
#### Possible Ways to Fix It
- Make sure commands like `vercel ls` work just fine. This will ensure that your user credentials are valid. If it's not working correctly, please log in again using `vercel login`.
- Ensure that the scope you specified using `--scope` shows up in the output of `vercel switch`. If it doesn't, you're either not part of the team (if you specified a team) or you logged into the wrong user account.
- Make sure commands like `now ls` work just fine. This will ensure that your user credentials are valid. If it's not working correctly, please log in again using `now login`.
- Ensure that the scope you specified using `--scope` shows up in the output of `now switch`. If it doesn't, you're either not part of the team (if you specified a team) or you logged into the wrong user account.

View File

@@ -6,4 +6,4 @@ You tried to add or update a domain's configuration, but you don't have permissi
#### Possible Ways to Fix It
If you or your team owns the domain, then you are most likely in the wrong context. Use `vercel switch` to select the team or user that owns the domain.
If you or your team owns the domain, then you are most likely in the wrong context. Use `now switch` to select the team or user that owns the domain.

View File

@@ -12,5 +12,5 @@ or from a previous deployment who's alias you're trying to overwrite) has
the `min` scale setting set to `0`. You can do this by running
```
vercel scale <deployment> 0 10
now scale <deployment> 0 10
```

View File

@@ -20,10 +20,10 @@ If you think your code is taking too long to instantiate, this can be due
to slow boot up times. You can supply `--no-verify` to skip verification
if you are confident your code runs properly.
If your application is not listening on a HTTP port, we might be failing to
If your application is not listening on a HTTP port, we might be failing to
instantiate your deployment as well. It might not be showing any errors,
but the deployment instance is effectively not routable and cannot be
verified.
If your instances are crashing before an HTTP port is exposed, verification
will fail as well. Double check your logs (e.g.: by running `vercel logs <url>`)
will fail as well. Double check your logs (e.g.: by running `now logs <url>`)

46
examples/README.md vendored
View File

@@ -14,43 +14,43 @@ Vercel is a cloud platform for static frontends and serverless functions. It ena
This repository consists of multiple examples, created for use with the [Vercel](https://vercel.com) platform. In addition to this, it also contains:
- [Code of Conduct](https://github.com/vercel/vercel/blob/master/.github/CODE_OF_CONDUCT.md) - our Code of Conduct, adapted from the [Contributor Covenant](http://contributor-covenant.org)
- [Contributing Guidelines](https://github.com/vercel/vercel/blob/master/.github/CONTRIBUTING.md) - a guide on how to contribute to the examples repository
- [License](https://github.com/vercel/vercel/blob/master/LICENSE) - the standard MIT license under which these examples are published
- [Code of Conduct](https://github.com/zeit/now/blob/master/.github/CODE_OF_CONDUCT.md) - our Code of Conduct, adapted from the [Contributor Covenant](http://contributor-covenant.org)
- [Contributing Guidelines](https://github.com/zeit/now/blob/master/.github/CONTRIBUTING.md) - a guide on how to contribute to the Now Examples repository
- [License](https://github.com/zeit/now/blob/master/LICENSE) - the standard MIT license under which these examples are published
We recommend familiarizing yourself with the above sections, particularly if you are looking to make a contribution.
## Deploying Examples
To get started using any of these examples as your own project, [install Vercel](https://vercel.com/download) and use either of the following commands in your terminal:
To get started using any of these examples as your own project, [install Now](https://vercel.com/download) and use either of the following commands in your terminal:
```sh
vercel init # Pick an example in the CLI
vercel init <example> # Create a new project from a specific <example>
vercel init <example> <name> # Create a new project from a specific <example> with a different folder <name>
now init # Pick an example in the CLI
now init <example> # Create a new project from a specific <example>
now init <example> <name> # Create a new project from a specific <example> with a different folder <name>
```
Deploying your project takes seconds and can be done with **just a single command**:
```sh
vercel # Deploy your project with the CLI
now # Deploys the project with Now
```
With the `vercel` command, your project will be built and served by Vercel, providing you with a URL that can be shared immediately.
With the `now` command, your project will be built and served by Now, providing you with a URL that can be shared immediately.
## New Examples
We are continuously improving our examples based on best practices and feedback from the community. As a result, it is possible that example names will change and on occasion deprecated in favor of an improved implementation.
For example, the previous `nodejs` example showed a static frontend with a Node.js API. This is illustrated in the `svelte` example. Below is a table that lists some of the most popular previous examples and the equivalent replacement:
For example, the previous `nodejs` example showed a static frontend with a Node.js API. This is illustrated now in the `svelte` example. Below is a table that lists some of the most popular previous examples and the equivalent replacement:
| Previous Example | New Example |
| ----------------- | ------------------------------------------------------------------------------------------ |
| **monorepo** | [gatsby-functions](https://github.com/vercel/vercel/tree/master/examples/gatsby) |
| **nodejs** | [svelte-functions](https://github.com/vercel/vercel/tree/master/examples/svelte) |
| **nextjs-static** | [nextjs](https://github.com/vercel/vercel/tree/master/examples/nextjs) |
| **vanilla-go** | [create-react-app](https://github.com/vercel/vercel/tree/master/examples/create-react-app) |
| **typescript** | [gatsby-functions](https://github.com/vercel/vercel/tree/master/examples/gatsby) |
| Previous Example | New Example |
| ----------------- | ------------------------------------------------------------------------------------- |
| **monorepo** | [gatsby-functions](https://github.com/zeit/now/tree/master/examples/gatsby) |
| **nodejs** | [svelte-functions](https://github.com/zeit/now/tree/master/examples/svelte) |
| **nextjs-static** | [nextjs](https://github.com/zeit/now/tree/master/examples/nextjs) |
| **vanilla-go** | [create-react-app](https://github.com/zeit/now/tree/master/examples/create-react-app) |
| **typescript** | [gatsby-functions](https://github.com/zeit/now/tree/master/examples/gatsby) |
## Migrating and Upgrading
@@ -60,15 +60,15 @@ If you would like to upgrade a project to take advantage of zero configuration,
## How to Contribute
Contributing examples should be an enjoyable experience, as such we have created a set of [contributing guidelines](https://github.com/vercel/vercel/blob/master/.github/CONTRIBUTING.md) to help you do so.
Contributing to Now Examples should be an enjoyable experience, as such we have created a set of [contributing guidelines](https://github.com/zeit/docs/blob/master/CONTRIBUTING.md) to help you do so.
The guidelines cover important information such as the requirements for new examples and where to get help if you have any questions.
We have tried to make contributing to examples as easy as possible, especially for those new to Open Source. If anything is unclear or you have any questions then please reach out to us on [GitHub Discussions](https://github.com/vercel/vercel/discussions) where we will do our best to help you.
We have tried to make contributing to Now Examples as easy as possible, especially for those new to Open Source. If anything is unclear or you have any questions then please reach out to us on [GitHub Discussions](https://github.com/zeit/now/discussions) where we will do our best to help you.
## Reporting Issues
We actively encourage our community to raise issues and provide feedback on areas of examples that could be improved.
We actively encourage our community to raise issues and provide feedback on areas of Now Examples that could be improved.
An issue can be raised by clicking the 'Issues' tab at the top of the repository, followed by the Green 'New issue' button.
@@ -76,10 +76,10 @@ When submitting an issue, please thoroughly and concisely describe the problem y
## License
This repository is an open source project. See the [License](https://github.com/vercel/vercel/blob/master/LICENSE).
Now Examples is an open source project released under the [MIT License](https://github.com/zeit/docs/blob/master/LICENSE.md).
## Get In Touch
If you have any questions that are not covered by raising an issue then please get in touch with us on [GitHub Discussions](https://github.com/vercel/vercel/discussions). There you will find both members of the community and staff who are happy to help answer questions on anything Vercel related.
If you have any questions that are not covered by raising an issue then please get in touch with us on [GitHub Discussions](https://github.com/zeit/now/discussions). There you will find both members of the community and staff who are happy to help answer questions on anything Vercel related.
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/vercel/vercel/discussions)
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/zeit/now/discussions)

View File

@@ -6,22 +6,22 @@ This directory is a brief example of an [AMP](https://amp.dev/) site that can be
Deploy your own AMP project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/amp)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/amp)
_Live Example: https://amp.now-examples.now.sh_
### How We Created This Example
To get started deploying AMP with Vercel, you can use the [Vercel CLI](https://vercel.com/download) to initialize the project:
To get started deploying AMP with Vercel, you can use the [Now CLI](https://vercel.com/download) to initialize the project:
```shell
$ vercel init amp
$ now init amp
```
### Deploying From Your Terminal
You can deploy your new AMP project with a single command from your terminal using Vercel CLI:
You can deploy your new AMP project with a single command from your terminal using Now CLI:
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Angular Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/angular.svg)
![Angular Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/angular.svg)
# Angular Example
@@ -8,7 +8,7 @@ This directory is a brief example of an [Angular](https://angular.io/) app that
Deploy your own Angular project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/angular)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/angular)
_Live Example: https://angular.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ ng new
### Deploying From Your Terminal
You can deploy your new Angular project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Angular project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Brunch](https://brunch.io/) site that ca
Deploy your own Brunch project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/brunch)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/brunch)
_Live Example: https://brunch.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ brunch new project-name -s es6
### Deploying From Your Terminal
You can deploy your new Brunch project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Brunch project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![React Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/react.svg)
![React Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/react.svg)
# React Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [React](https://reactjs.org/) app with [S
Deploy your own React project, along with Serverless Functions, with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/create-react-app-functions)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/create-react-app-functions)
_Live Example: https://create-react-app.now-examples.now.sh/_
@@ -22,8 +22,8 @@ $ npx create-react-app my-app
### Deploying From Your Terminal
You can deploy your new React project, along with [Serverless Functions](https://vercel.com/docs/v2/serverless-functions/introduction), with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new React project, along with [Serverless Functions](https://vercel.com/docs/v2/serverless-functions/introduction), with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -28,7 +28,7 @@ function App() {
</h2>
<p>
<a
href="https://github.com/vercel/vercel/tree/master/examples/create-react-app"
href="https://github.com/zeit/now/tree/master/examples/create-react-app"
target="_blank"
rel="noreferrer noopener"
>

View File

@@ -6,22 +6,22 @@ This directory is a brief example of using a Custom Build script that can be dep
Deploy your own Custom Built project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/custom-build)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/custom-build)
_Live Example: https://custom-build.now-examples.now.sh_
### How We Created This Example
To get started deploying a Custom Built project with Vercel, you can use the [Vercel CLI](https://vercel.com/download) to initialize the project:
To get started deploying a Custom Built project with Vercel, you can use the [Now CLI](https://vercel.com/download) to initialize the project:
```shell
$ vercel init custom-build
$ now init custom-build
```
### Deploying From Your Terminal
You can deploy your new Custom Built project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Custom Built project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Docusaurus](https://v2.docusaurus.io) si
Deploy your own Docusaurus project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/docusaurus-2)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now-examples/tree/master/docusaurus-2)
### How We Created This Example
@@ -18,8 +18,8 @@ $ npx @docusaurus/init@next init my-website classic
### Deploying From Your Terminal
You can deploy your new Docusaurus project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
Once initialized, you can deploy the Docusaurus example with just a single command:
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Docusaurus Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/docusaurus.svg)
![Docusaurus Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/docusaurus.svg)
# Docusaurus Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Docusaurus](https://docusaurus.io/) site
Deploy your own Docusaurus project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/docusaurus)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/docusaurus)
_Live Example: https://docusaurus.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ docusaurus-init
### Deploying From Your Terminal
You can deploy your new Docusaurus project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Docusaurus project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,20 +6,20 @@ This directory is a brief example of a [Dojo](https://dojo.io) site that can be
Deploy your own Dojo project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/dojo)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now-examples/tree/master/dojo)
### How We Created This Example
To get started with Dojo on Vercel, you can use the [Dojo CLI](https://github.com/dojo/cli) to initialize the project:
```shell
$ vercel init dojo
$ now init dojo
```
### Deploying From Your Terminal
You can deploy your new Dojo project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
Once initialized, you can deploy the Dojo example with just a single command:
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Eleventy Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/eleventy.svg)
![Eleventy Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/eleventy.svg)
# Eleventy Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Eleventy](https://www.11ty.io/) site tha
Deploy your own Eleventy project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/eleventy)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/eleventy)
_Live Example: https://eleventy.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ npx degit 11ty/eleventy-base-blog my-11ty-project
### Deploying From Your Terminal
You can deploy your new Eleventy project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Eleventy project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Ember Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/ember.svg)
![Ember Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/ember.svg)
# Ember Example
@@ -8,7 +8,7 @@ This directory is a brief example of an [Ember](https://emberjs.com/) app that c
Deploy your own Ember project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/ember)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/ember)
_Live Example: https://ember.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ npx ember-cli new ember-project
### Deploying From Your Terminal
You can deploy your new Ember project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Ember project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Gatsby Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/gatsby.svg)
![Gatsby Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/gatsby.svg)
# Gatsby Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Gatsby](https://www.gatsbyjs.org/) app w
Deploy your own Gatsby project, along with Serverless Functions, with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/gatsby)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/gatsby)
_Live Example: https://gatsby.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ gatsby new gatsby-site
### Deploying From Your Terminal
You can deploy your new Gatsby project, along with [Serverless Functions](https://vercel.com/docs/v2/serverless-functions/introduction), with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Gatsby project, along with [Serverless Functions](https://vercel.com/docs/v2/serverless-functions/introduction), with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -31,7 +31,7 @@ function Index() {
</h2>
<p>
<a
href="https://github.com/vercel/vercel/blob/master/gatsby"
href="https://github.com/zeit/now-examples/blob/master/gatsby-functions"
target="_blank"
rel="noreferrer noopener"
>

View File

@@ -1,4 +1,4 @@
![Gridsome Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/gridsome.svg)
![Gridsome Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/gridsome.svg)
# Gridsome Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Gridsome](https://gridsome.org/) app tha
Deploy your own Gridsome project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/gridsome)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/gridsome)
_Live Example: https://gridsome.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ gridsome create my-website
### Deploying From Your Terminal
You can deploy your new Gridsome project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Gridsome project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Hexo Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/hexo.svg)
![Hexo Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/hexo.svg)
# Hexo Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Hexo](https://hexo.io/) site that can be
Deploy your own Hexo project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/hexo)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/hexo)
_Live Example: https://hexo.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ hexo init project-name
### Deploying From Your Terminal
You can deploy your new Hexo project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Hexo project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Hugo](https://gohugo.io/) app that can b
Deploy your own Hugo project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/hugo)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/hugo)
_Live Example: https://hugo.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ hugo new site project-name
### Deploying From Your Terminal
You can deploy your new Hugo project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Hugo project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of an [Ionic Angular](https://ionicframework.c
Deploy your own Ionic Angular project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/ionic-angular)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/ionic-angular)
_Live Example: https://ionic-angular.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ npx ionic start [project-name] conference --type angular && cd [project-name]
### Deploying From Your Terminal
You can deploy your new Ionic Angular project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Ionic Angular project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of an [Ionic React](https://ionicframework.com
Deploy your own Ionic React project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/ionic-react)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/ionic-react)
_Live Example: https://ionic-react.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ npx ionic start [project-name] conference --type react && cd [project-name]
### Deploying From Your Terminal
You can deploy your new Ionic React project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Ionic React project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Jekyll](https://jekyllrb.com/) site that
Deploy your own Jekyll project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/jekyll)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/jekyll)
_Live Example: https://jekyll.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ jekyll new my-blog
### Deploying From Your Terminal
You can deploy your new Jekyll project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Jekyll project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Middleman](https://middlemanapp.com/) si
Deploy your own Middleman project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/middleman)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/middleman)
_Live Example: https://middleman.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ middleman init project-name
### Deploying From Your Terminal
You can deploy your new Middleman project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Middleman project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Nuxt.js](https://nuxtjs.org) app that ca
Deploy your own Nuxt.js project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/nuxtjs)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/nuxtjs)
_Live Example: https://nuxtjs.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ npx create-nuxt-app my-app
### Deploying From Your Terminal
You can deploy your new Nuxt.js project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Nuxt.js project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Polymer Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/polymer.svg)
![Polymer Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/polymer.svg)
# Polymer Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Polymer](https://www.polymer-project.org
Deploy your own Polymer project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/polymer)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/polymer)
_Live Example: https://polymer.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ polymer init
### Deploying From Your Terminal
You can deploy your new Polymer project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Polymer project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Preact Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/preact.svg)
![Preact Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/preact.svg)
# Preact Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Preact](https://preactjs.com/) app that
Deploy your own Preact project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/preact)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/preact)
_Live Example: https://preact.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ preact create default my-project
### Deploying From Your Terminal
You can deploy your new Preact project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Preact project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Saber Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/saber.svg)
![Saber Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/saber.svg)
# Saber Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Saber](https://saber.land) site that can
Deploy your own Saber project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/saber)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/saber)
_Live Example: https://saber.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ npm init site my-saber-site
### Deploying From Your Terminal
You can deploy your new Saber project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Saber project with a single command from your terminal using Now CLI:
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Sapper](https://sapper.svelte.dev/) app
Deploy your own Sapper project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/sapper)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/sapper)
_Live Example: https://sapper.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ npx degit "sveltejs/sapper-template#webpack" my-sapper-app
### Deploying From Your Terminal
You can deploy your new Sapper project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Sapper project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -1,29 +1,27 @@
![Scully Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/scully.svg)
# Scully
# Scully Example
This project was generated with [Angular CLI](https://github.com/angular/angular-cli).
This directory is a brief example of a [Scully](https://scully.io) site that can be deployed to Vercel with zero configuration.
## Development server
## Deploy Your Own
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
Deploy your own Scully project with Vercel.
## Code scaffolding
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/scully)
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
_Live Example: https://scully.now-examples.now.sh_
## Build
### How We Created This Example
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
To get started deploying Scully with Vercel, you can use the [Vercel CLI](https://vercel.com/download) to initialize the project:
## Running unit tests
```shell
$ vercel init scully
```
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
### Deploying From Your Terminal
## Running end-to-end tests
You can deploy your new Scully project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
```shell
$ vercel
```
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Stencil](https://stenciljs.com/) app tha
Deploy your own Stencil project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/stencil)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/stencil)
_Live Example: https://stencil.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ npm init stencil
### Deploying From Your Terminal
You can deploy your new Stencil project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Stencil project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -6,7 +6,7 @@ This directory is a brief example of a [Svelte](https://svelte.dev/) app with [S
Deploy your own Svelte project, along with Serverless Functions, with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/svelte)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/svelte)
_Live Example: https://svelte.now-examples.now.sh_
@@ -20,8 +20,8 @@ $ npx degit sveltejs/template my-svelte-project
### Deploying From Your Terminal
You can deploy your new Svelte project, along with [Serverless Functions](https://vercel.com/docs/v2/serverless-functions/introduction), with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Svelte project, along with [Serverless Functions](https://vercel.com/docs/v2/serverless-functions/introduction), with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -20,7 +20,7 @@
</h2>
<p>
<a
href="https://github.com/vercel/vercel/tree/master/examples/svelte"
href="https://github.com/zeit/now/tree/master/examples/svelte"
target="_blank"
rel="noreferrer noopener">
This project

View File

@@ -1,4 +1,4 @@
![UmiJS Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/umi.svg)
![UmiJS Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/umi.svg)
# UmiJS Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [UmiJS](https://umijs.org/) app that can
Deploy your own UmiJS project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/umijs)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/umijs)
_Live Example: https://umijs.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ yarn create umi app-name
### Deploying From Your Terminal
You can deploy your new UmiJS project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new UmiJS project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -4,16 +4,16 @@ This directory is a realtime serverless whiteboard powered by Pusher. The fronte
## Creating This Example
To get started with a realtime whiteboard on Vercel, you can use [Vercel CLI](https://vercel.com/download) to initialize the project:
To get started with a realtime whiteboard on Vercel, you can use [Now CLI](https://vercel.com/download) to initialize the project:
```shell
$ vercel init vanilla-pusher-functions
$ now init vanilla-pusher-functions
```
### Deploying From Your Terminal
## Deploying This Example
You can deploy your new project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
Once initialized, you can deploy the example with just a single command:
```shell
$ vercel
$ now
```

View File

@@ -1,4 +1,4 @@
![Vue.js Logo](https://github.com/vercel/vercel/blob/master/packages/frameworks/logos/vue.svg)
![Vue.js Logo](https://github.com/zeit/now/blob/master/packages/frameworks/logos/vue.svg)
# Vue.js Example
@@ -8,7 +8,7 @@ This directory is a brief example of a [Vue.js](https://vuejs.org/) app that can
Deploy your own Vue.js project with Vercel.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/vue)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/vue)
_Live Example: https://vue.now-examples.now.sh_
@@ -22,8 +22,8 @@ $ vue create
### Deploying From Your Terminal
You can deploy your new Vue.js project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):
You can deploy your new Vue.js project with a single command from your terminal using [Now CLI](https://vercel.com/download):
```shell
$ vercel
$ now
```

View File

@@ -3,7 +3,7 @@
"name": "Next.js",
"slug": "nextjs",
"demo": "https://nextjs.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/next.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/next.svg",
"tagline": "Next.js makes you productive with React instantly — whether you want to build static or dynamic sites. ",
"description": "A Next.js app and a Serverless Function API.",
"website": "https://nextjs.org",
@@ -31,7 +31,7 @@
"name": "Gatsby",
"slug": "gatsby",
"demo": "https://gatsby.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/gatsby.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/gatsby.svg",
"tagline": "Gatsby helps developers build blazing fast websites and apps with React.",
"description": "A Gatsby app, using the default starter theme and a Serverless Function API.",
"website": "https://gatsbyjs.org",
@@ -59,7 +59,7 @@
"name": "Hexo",
"slug": "hexo",
"demo": "https://hexo.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/hexo.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/hexo.svg",
"tagline": "Hexo is a fast, simple & powerful blog framework powered by Node.js.",
"description": "A Hexo site, created with the Hexo CLI.",
"website": "https://hexo.io/",
@@ -87,7 +87,7 @@
"name": "Eleventy",
"slug": "eleventy",
"demo": "https://eleventy.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/eleventy.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/eleventy.svg",
"tagline": "11ty is a simpler static site generator written in JavaScript, created to be an alternative to Jekyll.",
"description": "An Eleventy site, created with npm init.",
"website": "https://www.11ty.dev/",
@@ -115,7 +115,7 @@
"name": "Docusaurus 2",
"slug": "docusaurus-2",
"demo": "https://docusaurus-2.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/docusaurus.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/docusaurus.svg",
"tagline": "Docusaurus makes it easy to maintain Open Source documentation websites.",
"description": "A static Docusaurus site that makes it easy to maintain OSS documentation.",
"website": "https://v2.docusaurus.io",
@@ -143,7 +143,7 @@
"name": "Docusaurus 1",
"slug": "docusaurus",
"demo": "https://docusaurus.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/docusaurus.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/docusaurus.svg",
"tagline": "Docusaurus makes it easy to maintain Open Source documentation websites.",
"description": "A static Docusaurus site that makes it easy to maintain OSS documentation.",
"website": "https://docusaurus.io/",
@@ -171,7 +171,7 @@
"name": "Preact",
"slug": "preact",
"demo": "https://preact.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/preact.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/preact.svg",
"tagline": "Preact is a fast 3kB alternative to React with the same modern API.",
"description": "A Preact app, created with the Preact CLI.",
"website": "https://preactjs.com",
@@ -199,7 +199,7 @@
"name": "Dojo",
"slug": "dojo",
"demo": "https://dojo.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/dojo.png",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/dojo.png",
"tagline": "Dojo is a modern progressive, TypeScript first framework.",
"description": "A Dojo app, created with the Dojo CLI's cli-create-app command.",
"website": "https://dojo.io",
@@ -230,7 +230,7 @@
"name": "Ember",
"slug": "ember",
"demo": "https://ember.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/ember.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/ember.svg",
"tagline": "Ember.js helps webapp developers be more productive out of the box.",
"description": "An Ember app, created with the Ember CLI.",
"website": "https://emberjs.com/",
@@ -258,7 +258,7 @@
"name": "Vue.js",
"slug": "vue",
"demo": "https://vue.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/vue.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/vue.svg",
"tagline": "Vue.js is a versatile JavaScript framework that is as approachable as it is performant.",
"description": "A Vue.js app, created with the Vue CLI.",
"website": "https://vuejs.org",
@@ -286,7 +286,7 @@
"name": "Scully",
"slug": "scully",
"demo": "https://scully.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/scullyio-logo.png",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/scullyio-logo.png",
"tagline": "Scully is a static site generator for Angular.",
"description": "The Static Site Generator for Angular apps.",
"website": "https://github.com/scullyio/scully",
@@ -314,7 +314,7 @@
"name": "Ionic Angular",
"slug": "ionic-angular",
"demo": "https://ionic-angular.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/ionic.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/ionic.svg",
"tagline": "Ionic Angular allows you to build mobile PWAs with Angular and the Ionic Framework.",
"description": "An Ionic Angular site, created with the Ionic CLI.",
"website": "https://ionicframework.com",
@@ -342,7 +342,7 @@
"name": "Angular",
"slug": "angular",
"demo": "https://angular.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/angular.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/angular.svg",
"tagline": "Angular is a TypeScript-based cross-platform framework from Google.",
"description": "An Angular app, created with the Angular CLI.",
"website": "https://angular.io",
@@ -370,7 +370,7 @@
"name": "Polymer",
"slug": "polymer",
"demo": "https://polymer.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/polymer.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/polymer.svg",
"tagline": "Polymer is an open-source webapps library from Google, for building using Web Components.",
"description": "A Polymer app, created with the Polymer CLI.",
"website": "https://www.polymer-project.org/",
@@ -398,7 +398,7 @@
"name": "Svelte",
"slug": "svelte",
"demo": "https://svelte.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/svelte.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/svelte.svg",
"tagline": "Svelte lets you write high performance reactive apps with significantly less boilerplate. ",
"description": "A Svelte app, using the Svelte template, and a Serverless Function API.",
"website": "https://svelte.dev",
@@ -426,7 +426,7 @@
"name": "Ionic React",
"slug": "ionic-react",
"demo": "https://ionic-react.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/ionic.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/ionic.svg",
"tagline": "Ionic React allows you to build mobile PWAs with React and the Ionic Framework.",
"description": "An Ionic React site, created with the Ionic CLI.",
"website": "https://ionicframework.com",
@@ -454,7 +454,7 @@
"name": "Create React App",
"slug": "create-react-app",
"demo": "https://react-functions.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/react.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/react.svg",
"tagline": "Create React App allows you to get going with React in no time.",
"description": "A React app, bootstrapped with create-react-app, and a Serverless Function API.",
"website": "https://create-react-app.dev",
@@ -486,7 +486,7 @@
"name": "Gridsome",
"slug": "gridsome",
"demo": "https://gridsome.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/gridsome.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/gridsome.svg",
"tagline": "Gridsome is a Vue.js-powered framework for building websites & apps that are fast by default.",
"description": "A Gridsome app, created with the Gridsome CLI.",
"website": "https://gridsome.org/",
@@ -514,7 +514,7 @@
"name": "UmiJS",
"slug": "umijs",
"demo": "https://umijs.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/umi.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/umi.svg",
"tagline": "UmiJS is an extensible enterprise-level React application framework.",
"description": "An UmiJS app, created using the Umi CLI.",
"website": "https://umijs.org",
@@ -542,7 +542,7 @@
"name": "Sapper",
"slug": "sapper",
"demo": "https://sapper.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/svelte.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/svelte.svg",
"tagline": "Sapper is a framework for building high-performance universal web apps with Svelte.",
"description": "A Sapper app, using the Sapper template.",
"website": "https://sapper.svelte.dev",
@@ -570,7 +570,7 @@
"name": "Saber",
"slug": "saber",
"demo": "https://saber.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/saber.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/saber.svg",
"tagline": "Saber is a framework for building static sites in Vue.js that supports data from any source.",
"description": "A Saber site, created with npm init.",
"website": "https://saber.land/",
@@ -598,7 +598,7 @@
"name": "Stencil",
"slug": "stencil",
"demo": "https://stencil.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/stencil.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/stencil.svg",
"tagline": "Stencil is a powerful toolchain for building Progressive Web Apps and Design Systems.",
"description": "A Stencil site, created with the Stencil CLI.",
"website": "https://stenciljs.com/",
@@ -626,7 +626,7 @@
"name": "Nuxt.js",
"slug": "nuxtjs",
"demo": "https://nuxtjs.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/nuxt.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/nuxt.svg",
"tagline": "Nuxt.js is the web comprehensive framework that lets you dream big with Vue.js.",
"description": "A Nuxt.js app, bootstrapped with create-nuxt-app.",
"website": "https://nuxtjs.org",
@@ -654,7 +654,7 @@
"name": "Hugo",
"slug": "hugo",
"demo": "https://hugo.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/hugo.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/hugo.svg",
"tagline": "Hugo is the worlds fastest framework for building websites, written in Go.",
"description": "A Hugo site, created with the Hugo CLI.",
"website": "https://gohugo.io",
@@ -687,7 +687,7 @@
"name": "Jekyll",
"slug": "jekyll",
"demo": "https://jekyll.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/jekyll.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/jekyll.svg",
"tagline": "Jekyll makes it super easy to transform your plain text into static websites and blogs.",
"description": "A Jekyll site, created with the Jekyll CLI.",
"website": "https://jekyllrb.com/",
@@ -714,7 +714,7 @@
"name": "Brunch",
"slug": "brunch",
"demo": "https://brunch.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/brunch.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/brunch.svg",
"tagline": "Brunch is a fast and simple webapp build tool with seamless incremental compilation for rapid development.",
"description": "A Brunch app, created with the Brunch CLI.",
"website": "https://brunch.io/",
@@ -741,7 +741,7 @@
"name": "Middleman",
"slug": "middleman",
"demo": "https://middleman.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/middleman.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/middleman.svg",
"tagline": "Middleman is a static site generator that uses all the shortcuts and tools in modern web development.",
"description": "A Middleman app, created with the Middleman CLI.",
"website": "https://middlemanapp.com/",
@@ -767,7 +767,7 @@
{
"name": "Other",
"slug": null,
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/other.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/other.svg",
"description": "No framework or a unoptimized framework.",
"settings": {
"buildCommand": {

View File

@@ -1,10 +1,10 @@
{
"name": "@vercel/frameworks",
"version": "0.0.15-canary.4",
"version": "0.0.15-canary.0",
"main": "frameworks.json",
"license": "UNLICENSED",
"scripts": {
"test-unit": "jest --env node --verbose --runInBand --bail"
"test-unit": "jest --env node --verbose --runInBand --bail test/*unit.*test.*"
},
"devDependencies": {
"@types/jest": "24.0.22",
@@ -12,6 +12,6 @@
"ajv": "6.10.2",
"jest": "24.9.0",
"ts-jest": "24.1.0",
"typescript": "3.9.3"
"typescript": "3.5.2"
}
}

View File

@@ -122,7 +122,7 @@ describe('frameworks', () => {
.map(f => f.logo)
.filter(url => {
const prefix =
'https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/';
'https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/';
const name = url.replace(prefix, '');
return existsSync(path.join(__dirname, '..', 'logos', name)) === false;
});

View File

@@ -1,13 +1,13 @@
{
"name": "@vercel/build-utils",
"version": "2.3.2-canary.5",
"version": "2.3.2-canary.1",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.js",
"homepage": "https://github.com/vercel/vercel/blob/master/DEVELOPING_A_RUNTIME.md",
"homepage": "https://github.com/zeit/now/blob/master/DEVELOPING_A_RUNTIME.md",
"repository": {
"type": "git",
"url": "https://github.com/vercel/vercel.git",
"url": "https://github.com/zeit/now.git",
"directory": "packages/now-build-utils"
},
"scripts": {
@@ -45,7 +45,7 @@
"node-fetch": "2.2.0",
"semver": "6.1.1",
"ts-jest": "24.1.0",
"typescript": "3.9.3",
"typescript": "3.5.2",
"yazl": "2.4.3"
}
}

View File

@@ -82,7 +82,6 @@ export async function detectBuilders(
defaultRoutes: Route[] | null;
redirectRoutes: Route[] | null;
rewriteRoutes: Route[] | null;
errorRoutes: Route[] | null;
}> {
const errors: ErrorResponse[] = [];
const warnings: ErrorResponse[] = [];
@@ -100,7 +99,6 @@ export async function detectBuilders(
defaultRoutes: null,
redirectRoutes: null,
rewriteRoutes: null,
errorRoutes: null,
};
}
@@ -156,7 +154,6 @@ export async function detectBuilders(
defaultRoutes: null,
redirectRoutes: null,
rewriteRoutes: null,
errorRoutes: null,
};
}
@@ -234,7 +231,6 @@ export async function detectBuilders(
redirectRoutes: null,
defaultRoutes: null,
rewriteRoutes: null,
errorRoutes: null,
};
}
@@ -276,7 +272,6 @@ export async function detectBuilders(
redirectRoutes: null,
defaultRoutes: null,
rewriteRoutes: null,
errorRoutes: null,
};
}
@@ -314,7 +309,6 @@ export async function detectBuilders(
redirectRoutes: routesResult.redirectRoutes,
defaultRoutes: routesResult.defaultRoutes,
rewriteRoutes: routesResult.rewriteRoutes,
errorRoutes: routesResult.errorRoutes,
};
}
@@ -904,17 +898,10 @@ function getRouteResult(
defaultRoutes: Route[];
redirectRoutes: Route[];
rewriteRoutes: Route[];
errorRoutes: Route[];
} {
const defaultRoutes: Route[] = [];
const redirectRoutes: Route[] = [];
const rewriteRoutes: Route[] = [];
const errorRoutes: Route[] = [];
const isNextjs =
frontendBuilder &&
((frontendBuilder.use && frontendBuilder.use.startsWith('@vercel/next')) ||
(frontendBuilder.config &&
frontendBuilder.config.framework === 'nextjs'));
if (apiRoutes && apiRoutes.length > 0) {
if (options.featHandleMiss) {
@@ -981,21 +968,10 @@ function getRouteResult(
});
}
if (options.featHandleMiss && !isNextjs) {
// Exclude Next.js to avoid overriding custom error page
// https://nextjs.org/docs/advanced-features/custom-error-page
errorRoutes.push({
status: 404,
src: '^/(?!.*api).*$',
dest: options.cleanUrls ? '/404' : '/404.html',
});
}
return {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
};
}

View File

@@ -7,13 +7,11 @@ export class NowBuildError extends Error {
public hideStackTrace = true;
public code: string;
public link?: string;
public action?: string;
constructor({ message, code, link, action }: Props) {
constructor({ message, code, link }: Props) {
super(message);
this.code = code;
this.link = link;
this.action = action;
}
}
@@ -33,8 +31,4 @@ interface Props {
* link to more information about this error.
*/
link?: string;
/**
* Optional "action" to display before the `link`, such as "More details".
*/
action?: string;
}

View File

@@ -48,7 +48,7 @@ export default async function download(
} = meta || {};
if (isDev || skipDownload) {
// In `vercel dev`, the `download()` function is a no-op because
// In `now dev`, the `download()` function is a no-op because
// the `basePath` matches the `cwd` of the dev server, so the
// source files are already available.
return files as DownloadedFiles;

View File

@@ -169,7 +169,7 @@ export async function getNodeVersion(
meta?: Meta
): Promise<NodeVersion> {
if (meta && meta.isDev) {
// Use the system-installed version of `node` in PATH for `vercel dev`
// Use the system-installed version of `node` in PATH for `now dev`
const latest = getLatestNodeVersion();
return { ...latest, runtime: 'nodejs' };
}
@@ -291,7 +291,7 @@ export async function runNpmInstall(
} else {
opts.prettyCommand = 'yarn install';
command = 'yarn';
commandArgs = ['install', ...args];
commandArgs = args.concat(['install', '--ignore-engines']);
}
if (process.env.NPM_ONLY_PRODUCTION) {
@@ -375,7 +375,7 @@ export async function runPackageJsonScript(
} else {
const prettyCommand = `yarn run ${scriptName}`;
console.log(`Running "${prettyCommand}"`);
await spawnAsync('yarn', ['run', scriptName], {
await spawnAsync('yarn', ['--ignore-engines', 'run', scriptName], {
...spawnOpts,
cwd: destPath,
prettyCommand,

View File

@@ -114,7 +114,7 @@ export interface BuildOptions {
config: Config;
/**
* Metadata related to the invoker of the builder, used by `vercel dev`.
* Metadata related to the invoker of the builder, used by `now dev`.
* Builders may use the properties on this object to change behavior based
* on the build environment.
*/
@@ -201,7 +201,7 @@ export interface StartDevServerSuccess {
port: number;
/**
* Process ID number of the dev server. Useful for the `vercel dev` server to
* Process ID number of the dev server. Useful for the `now dev` server to
* shut down the dev server once an HTTP request has been fulfilled.
*/
pid: number;

View File

@@ -1,11 +0,0 @@
/node_modules/
/public/build/
.DS_Store
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
yarnPath: ".yarn/releases/yarn-berry.js"

View File

@@ -1,55 +0,0 @@
_Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)_
---
# svelte app
This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template.
To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):
```bash
npx degit sveltejs/template svelte-app
cd svelte-app
```
_Note that you will need to have [Node.js](https://nodejs.org) installed._
## Get started
Install the dependencies...
```bash
cd svelte-app
npm install
```
...then start [Rollup](https://rollupjs.org):
```bash
npm run dev
```
Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.
## Building and running in production mode
To create an optimised version of the app:
```bash
npm run build
```
You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com).
## Single-page app mode
By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.
If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for _any_ path. You can make it so by editing the `"start"` command in package.json:
```js
"start": "sirv public --single"
```

View File

@@ -1,5 +0,0 @@
{
"version": 2,
"builds": [{ "src": "package.json", "use": "@vercel/static-build" }],
"probes": [{ "path": "/", "mustContain": "Svelte app" }]
}

View File

@@ -1,21 +0,0 @@
{
"name": "svelte-app",
"version": "1.0.0",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^12.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"rollup": "^2.3.4",
"rollup-plugin-livereload": "^1.0.0",
"rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^5.1.2",
"svelte": "^3.0.0"
},
"dependencies": {
"sirv-cli": "^0.4.4"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,66 +0,0 @@
html, body {
position: relative;
width: 100%;
height: 100%;
}
body {
color: #333;
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
a {
color: rgb(0,100,200);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: rgb(0,80,160);
}
label {
display: block;
}
input, button, select, textarea {
font-family: inherit;
font-size: inherit;
padding: 0.4em;
margin: 0 0 0.5em 0;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 2px;
}
input:disabled {
color: #ccc;
}
input[type="range"] {
height: 0;
}
button {
color: #333;
background-color: #f4f4f4;
outline: none;
}
button:disabled {
color: #999;
}
button:not(:disabled):active {
background-color: #ddd;
}
button:focus {
border-color: #666;
}

View File

@@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>Svelte app</title>
<link rel='icon' type='image/png' href='/favicon.png'>
<link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='/build/bundle.css'>
<script defer src='/build/bundle.js'></script>
</head>
<body>
</body>
</html>

View File

@@ -1,71 +0,0 @@
import svelte from 'rollup-plugin-svelte';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
const production = !process.env.ROLLUP_WATCH;
export default {
input: 'src/main.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/bundle.js'
},
plugins: [
svelte({
// enable run-time checks when not in production
dev: !production,
// we'll extract any component CSS out into
// a separate file - better for performance
css: css => {
css.write('public/build/bundle.css');
}
}),
// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),
// In dev mode, call `npm run start` once
// the bundle has been generated
!production && serve(),
// Watch the `public` directory and refresh the
// browser on changes when not in production
!production && livereload('public'),
// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser()
],
watch: {
clearScreen: false
}
};
function serve() {
let started = false;
return {
writeBundle() {
if (!started) {
started = true;
require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});
}
}
};
}

View File

@@ -1,30 +0,0 @@
<script>
export let name;
</script>
<main>
<h1>Hello {name}!</h1>
<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
</main>
<style>
main {
text-align: center;
padding: 1em;
max-width: 240px;
margin: 0 auto;
}
h1 {
color: #ff3e00;
text-transform: uppercase;
font-size: 4em;
font-weight: 100;
}
@media (min-width: 640px) {
main {
max-width: none;
}
}
</style>

View File

@@ -1,10 +0,0 @@
import App from './App.svelte';
const app = new App({
target: document.body,
props: {
name: 'world'
}
});
export default app;

File diff suppressed because it is too large Load Diff

View File

@@ -531,7 +531,6 @@ describe('Test `detectBuilders`', () => {
const files = ['api/user.php'];
// @ts-ignore
const { errors } = await detectBuilders(files, null, {
// @ts-ignore
functions,
});
@@ -868,14 +867,12 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/next');
expect(errors).toBe(null);
expect(defaultRoutes).toStrictEqual([]);
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes).toStrictEqual([]);
expect(errorRoutes).toStrictEqual([]);
});
it('package.json + no build + next', async () => {
@@ -890,14 +887,12 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/next');
expect(errors).toBe(null);
expect(defaultRoutes).toStrictEqual([]);
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes).toStrictEqual([]);
expect(errorRoutes).toStrictEqual([]);
});
it('package.json + no build', async () => {
@@ -918,15 +913,12 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, null, { featHandleMiss });
expect(builders).toBe(null);
expect(errors).toBe(null);
expect(defaultRoutes).toStrictEqual([]);
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes).toStrictEqual([]);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('no package.json + public', async () => {
@@ -937,7 +929,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, null, { featHandleMiss });
expect(builders![1].use).toBe('@vercel/static');
expect(errors).toBe(null);
@@ -948,8 +939,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes!.length).toBe(1);
expect((rewriteRoutes![0] as Source).status).toBe(404);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('no package.json + no build + raw static + api', async () => {
@@ -960,7 +949,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, null, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/node');
expect(builders![0].src).toBe('api/users.js');
@@ -975,8 +963,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes!.length).toBe(1);
expect((rewriteRoutes![0] as Source).status).toBe(404);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('package.json + no build + root + api', async () => {
@@ -1004,7 +990,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, undefined, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/node');
expect(builders![0].src).toBe('api/[endpoint]/[id].js');
@@ -1017,8 +1002,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(rewriteRoutes!.length).toBe(2);
expect((rewriteRoutes![0] as Source).src).toBe('^/api/([^/]+)/([^/]+)$');
expect((rewriteRoutes![1] as Source).status).toBe(404);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('api + next + public', async () => {
@@ -1033,7 +1016,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/node');
expect(builders![0].src).toBe('api/endpoint.js');
@@ -1047,7 +1029,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes!.length).toBe(1);
expect((rewriteRoutes![0] as Source).status).toBe(404);
expect(errorRoutes).toStrictEqual([]);
});
it('api + next + raw static', async () => {
@@ -1062,7 +1043,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/node');
expect(builders![0].src).toBe('api/endpoint.js');
@@ -1076,7 +1056,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes!.length).toBe(1);
expect((rewriteRoutes![0] as Source).status).toBe(404);
expect(errorRoutes).toStrictEqual([]);
});
it('api + raw static', async () => {
@@ -1087,7 +1066,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, null, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/node');
expect(builders![0].src).toBe('api/endpoint.js');
@@ -1101,8 +1079,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes!.length).toBe(1);
expect((rewriteRoutes![0] as Source).status).toBe(404);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('api + raw static + package.json no build script', async () => {
@@ -1117,7 +1093,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/node');
expect(builders![0].src).toBe('api/version.js');
@@ -1131,8 +1106,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes!.length).toBe(1);
expect((rewriteRoutes![0] as Source).status).toBe(404);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('api + public', async () => {
@@ -1143,7 +1116,7 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
'README.md',
];
const { builders, errorRoutes } = await detectBuilders(files, undefined, {
const { builders } = await detectBuilders(files, undefined, {
featHandleMiss,
});
expect(builders![0].use).toBe('@vercel/node');
@@ -1151,8 +1124,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(builders![1].use).toBe('@vercel/static');
expect(builders![1].src).toBe('public/**/*');
expect(builders!.length).toBe(2);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('api go with test files', async () => {
@@ -1171,26 +1142,21 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
'api/src/controllers/user.module_test.go',
];
const { builders, errorRoutes } = await detectBuilders(files, undefined, {
const { builders } = await detectBuilders(files, undefined, {
featHandleMiss,
});
expect(builders!.length).toBe(7);
expect(builders!.some(b => b.src.endsWith('_test.go'))).toBe(false);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('just public', async () => {
const files = ['public/index.html', 'public/favicon.ico', 'README.md'];
const { builders, errorRoutes } = await detectBuilders(files, undefined, {
const { builders } = await detectBuilders(files, undefined, {
featHandleMiss,
});
expect(builders![0].src).toBe('public/**/*');
expect(builders![0].use).toBe('@vercel/static');
expect(builders!.length).toBe(1);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('next + public', async () => {
@@ -1200,13 +1166,10 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
};
const files = ['package.json', 'public/index.html', 'README.md'];
const { builders, errorRoutes } = await detectBuilders(files, pkg, {
featHandleMiss,
});
const { builders } = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/next');
expect(builders![0].src).toBe('package.json');
expect(builders!.length).toBe(1);
expect(errorRoutes!.length).toBe(0);
});
it('nuxt', async () => {
@@ -1216,14 +1179,10 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
};
const files = ['package.json', 'pages/index.js'];
const { builders, errorRoutes } = await detectBuilders(files, pkg, {
featHandleMiss,
});
const { builders } = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/static-build');
expect(builders![0].src).toBe('package.json');
expect(builders!.length).toBe(1);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('nuxt + tag canary', async () => {
@@ -1233,29 +1192,23 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
};
const files = ['package.json', 'pages/index.js'];
const { builders, errorRoutes } = await detectBuilders(files, pkg, {
const { builders } = await detectBuilders(files, pkg, {
tag: 'canary',
featHandleMiss,
});
expect(builders![0].use).toBe('@vercel/static-build@canary');
expect(builders![0].src).toBe('package.json');
expect(builders!.length).toBe(1);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('package.json with no build + api', async () => {
const pkg = { dependencies: { next: '9.0.0' } };
const files = ['package.json', 'api/[endpoint].js'];
const { builders, errorRoutes } = await detectBuilders(files, pkg, {
featHandleMiss,
});
const { builders } = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders![0].use).toBe('@vercel/node');
expect(builders![0].src).toBe('api/[endpoint].js');
expect(builders!.length).toBe(1);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('package.json with no build + public directory', async () => {
@@ -1374,7 +1327,7 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
it('many static files + one api file', async () => {
const files = Array.from({ length: 5000 }).map((_, i) => `file${i}.html`);
files.push('api/index.ts');
const { builders, errorRoutes } = await detectBuilders(files, undefined, {
const { builders } = await detectBuilders(files, undefined, {
featHandleMiss,
});
@@ -1383,8 +1336,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(builders![0].src).toBe('api/index.ts');
expect(builders![1].use).toBe('@vercel/static');
expect(builders![1].src).toBe('!{api/**,package.json}');
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('functions with nextjs', async () => {
@@ -1579,7 +1530,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
const files = ['api/user.php'];
// @ts-ignore
const { errors } = await detectBuilders(files, null, {
// @ts-ignore
functions,
featHandleMiss,
});
@@ -1680,7 +1630,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
// @ts-ignore
const { errors } = await detectBuilders(files, null, {
// @ts-ignore
functions,
featHandleMiss,
});
@@ -1697,7 +1646,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
// @ts-ignore: Since we test an invalid type
const { errors } = await detectBuilders(files, null, {
// @ts-ignore
functions,
featHandleMiss,
});
@@ -1733,7 +1681,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, null, {
projectSettings,
featHandleMiss,
@@ -1746,8 +1693,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(defaultRoutes).toStrictEqual([]);
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes).toStrictEqual([]);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('Custom static output directory with api', async () => {
@@ -1762,7 +1707,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, null, {
projectSettings,
featHandleMiss,
@@ -1778,8 +1722,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
expect(redirectRoutes).toStrictEqual([]);
expect(rewriteRoutes!.length).toBe(1);
expect((rewriteRoutes![0] as Source).status).toBe(404);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('Framework with non-package.json entrypoint', async () => {
@@ -1788,7 +1730,7 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
framework: 'hugo',
};
const { builders, errorRoutes } = await detectBuilders(files, null, {
const { builders } = await detectBuilders(files, null, {
projectSettings,
featHandleMiss,
});
@@ -1803,8 +1745,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
},
},
]);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('No framework, only package.json', async () => {
@@ -1815,9 +1755,7 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
},
};
const { builders, errorRoutes } = await detectBuilders(files, pkg, {
featHandleMiss,
});
const { builders } = await detectBuilders(files, pkg, { featHandleMiss });
expect(builders).toEqual([
{
@@ -1828,15 +1766,13 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
},
},
]);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('Framework with an API', async () => {
const files = ['config.rb', 'api/date.rb'];
const projectSettings = { framework: 'middleman' };
const { builders, errorRoutes } = await detectBuilders(files, null, {
const { builders } = await detectBuilders(files, null, {
projectSettings,
featHandleMiss,
});
@@ -1858,8 +1794,6 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
},
},
]);
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('Error for non-api functions', async () => {
@@ -1909,19 +1843,13 @@ describe('Test `detectBuilders` with `featHandleMiss=true`', () => {
it('All static if `buildCommand` is an empty string with an `outputDirectory`', async () => {
const files = ['out/index.html'];
const projectSettings = { buildCommand: '', outputDirectory: 'out' };
const { builders, errors, errorRoutes } = await detectBuilders(
files,
null,
{
projectSettings,
featHandleMiss,
}
);
const { builders, errors } = await detectBuilders(files, null, {
projectSettings,
featHandleMiss,
});
expect(errors).toBe(null);
expect(builders![0]!.use).toBe('@vercel/static');
expect(builders![0]!.src).toBe('out/**/*');
expect(errorRoutes!.length).toBe(1);
expect((errorRoutes![0] as Source).status).toBe(404);
});
it('do not require build script when `buildCommand` is an empty string', async () => {
@@ -2097,13 +2025,9 @@ it('Test `detectRoutes` with `featHandleMiss=true`', async () => {
{
const files = ['api/user.go', 'api/team.js', 'api/package.json'];
const { defaultRoutes, rewriteRoutes, errorRoutes } = await detectBuilders(
files,
null,
{
featHandleMiss,
}
);
const { defaultRoutes, rewriteRoutes } = await detectBuilders(files, null, {
featHandleMiss,
});
expect(defaultRoutes).toStrictEqual([
{ handle: 'miss' },
{
@@ -2119,44 +2043,6 @@ it('Test `detectRoutes` with `featHandleMiss=true`', async () => {
continue: true,
},
]);
expect(errorRoutes).toStrictEqual([
{
status: 404,
src: '^/(?!.*api).*$',
dest: '/404.html',
},
]);
const pattern = new RegExp(errorRoutes![0].src!);
[
'/',
'/index.html',
'/page.html',
'/page',
'/another/index.html',
'/another/page.html',
'/another/page',
'/another/sub/index.html',
'/another/sub/page.html',
'/another/sub/page',
].forEach(file => {
expect(file).toMatch(pattern);
});
[
'/api',
'/api/',
'/api/index.html',
'/api/page.html',
'/api/page',
'/api/sub',
'/api/sub/index.html',
'/api/sub/page.html',
'/api/sub/page',
].forEach(file => {
expect(file).not.toMatch(pattern);
});
}
{
@@ -2440,7 +2326,6 @@ it('Test `detectRoutes` with `featHandleMiss=true`, `cleanUrls=true`', async ()
defaultRoutes,
redirectRoutes,
rewriteRoutes,
errorRoutes,
} = await detectBuilders(files, null, options);
testHeaders(redirectRoutes);
expect(defaultRoutes).toStrictEqual([]);
@@ -2451,13 +2336,6 @@ it('Test `detectRoutes` with `featHandleMiss=true`, `cleanUrls=true`', async ()
continue: true,
},
]);
expect(errorRoutes).toStrictEqual([
{
status: 404,
src: '^/(?!.*api).*$',
dest: '/404',
},
]);
// expected redirect should match inputs
const getLocation = createReplaceLocation(redirectRoutes);

View File

@@ -139,7 +139,7 @@ it('should match all semver ranges', async () => {
expect(await getSupportedNodeVersion('^10.5.0')).toHaveProperty('major', 10);
});
it('should ignore node version in vercel dev getNodeVersion()', async () => {
it('should ignore node version in now dev getNodeVersion()', async () => {
expect(
await getNodeVersion(
'/tmp',

View File

@@ -1,10 +1,10 @@
{
"name": "@vercel/cgi",
"version": "1.0.6-canary.0",
"version": "1.0.5",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/vercel/vercel.git",
"url": "https://github.com/zeit/now.git",
"directory": "packages/now-cgi"
},
"scripts": {

Some files were not shown because too many files have changed in this diff Show More