mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
[all] Rename GitHub repo to vercel/vercel (#4506)
We renamed the GitHub repository from `zeit/now` to `vercel/vercel` so this PR updates all references to the repo URL. There were also a few remaining references to Now CLI that have been updated to Vercel CLI.
This commit is contained in:
18
.github/CONTRIBUTING.md
vendored
18
.github/CONTRIBUTING.md
vendored
@@ -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/zeit/now/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/vercel/vercel/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/zeit/now
|
||||
git clone https://github.com/vercel/vercel
|
||||
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/zeit/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/vercel/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 `now 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 `vercel 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 `now *.tgz` to upload the tarball file and get a URL
|
||||
4. Run `vercel *.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 `now` or `now dev` to deploy with the experimental Builder
|
||||
6. Run `vercel` or `vercel 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 `@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.
|
||||
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.
|
||||
4. After your Pull Request has been merged and released, other users can select the example on the Vercel dashboard and deploy it.
|
||||
|
||||
6
.github/EXAMPLE_README_TEMPLATE.md
vendored
6
.github/EXAMPLE_README_TEMPLATE.md
vendored
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now-examples/tree/master/example-directory)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/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
|
||||
$ now init charge
|
||||
$ vercel init [Name]]
|
||||
```
|
||||
|
||||
### Deploying From Your Terminal
|
||||
@@ -21,5 +21,5 @@ $ now init charge
|
||||
Once initialized, you can deploy the [Name] example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -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/zeit/now/discussions/new?category_id=66161
|
||||
url: https://github.com/vercel/vercel/discussions/new?category_id=66161
|
||||
about: Share ideas for new features
|
||||
- name: Ask a Question
|
||||
url: https://github.com/zeit/now/discussions/new?category_id=66160
|
||||
url: https://github.com/vercel/vercel/discussions/new?category_id=66160
|
||||
about: Ask the community for help
|
||||
|
||||
@@ -32,7 +32,7 @@ export analyze({
|
||||
If you are using TypeScript, you should use the following types:
|
||||
|
||||
```ts
|
||||
import { AnalyzeOptions } from '@now/build-utils'
|
||||
import { AnalyzeOptions } from '@vercel/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 '@now/build-utils'
|
||||
import { BuildOptions } from '@vercel/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 '@now/build-utils'
|
||||
import { PrepareCacheOptions } from '@vercel/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 `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.
|
||||
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.
|
||||
|
||||
```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 '@now/build-utils'
|
||||
import { ShouldServeOptions } from '@vercel/build-utils'
|
||||
|
||||
export shouldServe(options: ShouldServeOptions) {
|
||||
return Boolean
|
||||
}
|
||||
```
|
||||
|
||||
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).
|
||||
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).
|
||||
|
||||
### 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/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.
|
||||
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.
|
||||
|
||||
## 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 `@now/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 `@vercel/build-utils` (as seen below in the API definitions) as a dependency, but rather as part of `peerDependencies`.
|
||||
|
||||
## Types
|
||||
|
||||
### `Files`
|
||||
|
||||
```ts
|
||||
import { File } from '@now/build-utils';
|
||||
import { File } from '@vercel/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 '@now/build-utils';
|
||||
import { File } from '@vercel/build-utils';
|
||||
```
|
||||
|
||||
Valid `File` types include:
|
||||
@@ -212,7 +212,7 @@ Valid `File` types include:
|
||||
### `FileRef`
|
||||
|
||||
```ts
|
||||
import { FileRef } from '@now/build-utils';
|
||||
import { FileRef } from '@vercel/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 '@now/build-utils';
|
||||
import { FileFsRef } from '@vercel/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 '@now/build-utils';
|
||||
import { FileBlob } from '@vercel/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 '@now/build-utils';
|
||||
import { Lambda } from '@vercel/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 `@now/build-utils` to simplify the process of writing Runtimes, manipulating the file system, using the above types, etc.
|
||||
The following is exposed by `@vercel/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 '@now/build-utils';
|
||||
import { createLambda } from '@vercel/build-utils';
|
||||
```
|
||||
|
||||
Constructor for the [`Lambda`](#lambda) type.
|
||||
|
||||
```js
|
||||
const { createLambda, FileBlob } = require('@now/build-utils');
|
||||
const { createLambda, FileBlob } = require('@vercel/build-utils');
|
||||
await createLambda({
|
||||
runtime: 'nodejs8.10',
|
||||
handler: 'index.main',
|
||||
@@ -321,7 +321,7 @@ await createLambda({
|
||||
Signature: `download() : Files`
|
||||
|
||||
```ts
|
||||
import { download } from '@now/build-utils';
|
||||
import { download } from '@vercel/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 '@now/build-utils';
|
||||
import { glob } from '@vercel/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('@now/build-utils')
|
||||
const { glob, download } = require('@vercel/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 '@now/build-utils';
|
||||
import { getWriteableDirectory } from '@vercel/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 '@now/build-utils';
|
||||
import { rename } from '@vercel/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('@now/build-utils')
|
||||
const rename = require('@vercel/build-utils')
|
||||
const originalFiles = { 'one.go': fileFsRef1, 'two.go': fileFsRef2 }
|
||||
const renamedFiles = rename(originalFiles, path => path.replace(/\.go$/, '')
|
||||
```
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -175,7 +175,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Copyright 2017 ZEIT, Inc.
|
||||
Copyright 2017 Vercel, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<p align="center">Develop. Preview. Ship.</p>
|
||||
</p>
|
||||
|
||||
[](https://github.com/zeit/now/actions?workflow=CI)
|
||||
[](https://github.com/zeit/now/discussions)
|
||||
[](https://github.com/vercel/vercel/actions?workflow=CI)
|
||||
[](https://github.com/vercel/vercel/discussions)
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -31,4 +31,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/zeit/now/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/vercel/vercel/wiki/Creating-a-Release).
|
||||
|
||||
@@ -52,6 +52,7 @@ export async function getGitHubRepoInfo(repo: Repo) {
|
||||
}
|
||||
|
||||
if (data.id === 'vercel/vercel' && data.subdir && data.subdir[0] === 'examples') {
|
||||
|
||||
// from our examples, add `homepage` and `description` fields
|
||||
const example = data.subdir[1];
|
||||
const exampleList = await getExampleList();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// A proxy to get the basic info of an existing github/gitlab repo:
|
||||
// GET /info?repo=zeit/micro
|
||||
// GET /info?repo=vercel/micro
|
||||
|
||||
// @ts-ignore
|
||||
import parseGitUrl from 'parse-github-url';
|
||||
|
||||
@@ -33,5 +33,5 @@ When passing multiple `--regions` as a CLI parameter,
|
||||
make sure they're separated by a comma (`,`). For example:
|
||||
|
||||
```console
|
||||
now --regions sfo,bru,gru
|
||||
vercel --regions sfo,bru,gru
|
||||
```
|
||||
|
||||
@@ -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 `now domains inspect <domain>`.
|
||||
You can retrieve both the intended nameservers and TXT verification record for the domain you wish to verify by running `vercel domains inspect <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.
|
||||
When you have added either verification method to your domain, you can run `vercel 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 `now domains rm <domain>`.
|
||||
If you would not like to verify your domain, you can remove it from your account using `vercel domains rm <domain>`.
|
||||
|
||||
#### Resources
|
||||
|
||||
|
||||
@@ -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
|
||||
now -e VARIABLE_NAME=@secret-name
|
||||
vercel -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 `now switch` or `--scope` to switch to a different team or user.
|
||||
You can run `vercel switch` or `--scope` to switch to a different team or user.
|
||||
|
||||
@@ -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 Now 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 Vercel CLI. In addition, please ensure that the filename starts with a dot (example: `.env`) - then it should work.
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
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).
|
||||
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).
|
||||
|
||||
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.
|
||||
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`.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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 (either `.env` or `.env.build`).
|
||||
The error message will list environment variables that are required and which file they are required to be included in `.env`.
|
||||
|
||||
If the file does not exist yet, please create the file that the error message mentions and insert the missing environment variable into it.
|
||||
|
||||
|
||||
@@ -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
|
||||
now -e VARIABLE_NAME="VALUE"
|
||||
vercel -e VARIABLE_NAME="VALUE"
|
||||
```
|
||||
|
||||
You can also specify a environment variable that contains a secret:
|
||||
|
||||
```bash
|
||||
now -e VARIABLE_NAME=@secret-name
|
||||
vercel -e VARIABLE_NAME=@secret-name
|
||||
```
|
||||
|
||||
@@ -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/teams/zeit`, you would set `--scope` to `zeit`.
|
||||
As an example, if your team URL is `https://vercel.com/my-team`, you would set `--scope` to `my-team`.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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).
|
||||
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).
|
||||
|
||||
#### 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/teams/zeit`, the value can be `zeit`) 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/my-team`, the value can be `my-team`) or the username or ID of a user you'd like to act as.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# `now dev` as `dev` script
|
||||
# `vercel dev` as `dev` script
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
The `package.json` file of the used project invokes `now dev` as `dev` script. This would cause `now dev` to recursively invoke itself.
|
||||
The `package.json` file of the used project invokes `vercel dev` as `dev` script. This would cause `vercel dev` to recursively invoke itself.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
|
||||
@@ -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/zeit/next.js#summary)
|
||||
- Uses Next.js build targets (`target: 'serverless'`) in `next.config.js`. [documentation](https://github.com/vercel/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/zeit/next.js#summary))
|
||||
- Does not load `next.config.js` ([as per the serverless target documentation](https://github.com/vercel/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/zeit/now-builders/pull/150)
|
||||
- [Serverless target implementation](https://github.com/vercel/now-builders/pull/150)
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# `@now/static-build` Failed to detect a server running
|
||||
# `@vercel/static-build` Failed to detect a server running
|
||||
|
||||
#### Why This Warning Occurred
|
||||
|
||||
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
|
||||
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
|
||||
`package.json` file.
|
||||
|
||||
In order for `now dev` to know which port the server is running on, the builder
|
||||
In order for `vercel 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 `now-dev` script binds the spawned development server on
|
||||
Please ensure that your `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 `now-dev` script must use the `-p`
|
||||
For example, if you are using Gatsby, your `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 `now-dev` script must use the `-p`
|
||||
...
|
||||
"scripts": {
|
||||
...
|
||||
"now-dev": "gatsby develop -p $PORT"
|
||||
"dev": "gatsby develop -p $PORT"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
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>`.
|
||||
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>`.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
When supplying a region or DC identifier in `now scale`,
|
||||
When supplying a region or DC identifier in `vercel scale`,
|
||||
we weren't able to recognize the value as valid.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
Check your `now scale` command make sure you are using a
|
||||
Check your `vercel 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 `now-cli`, they currently are transformed to
|
||||
In Vercel 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:
|
||||
|
||||
```
|
||||
now scale my-url-123.now.sh sfo,bru,gru 1 5
|
||||
vercel scale my-url-123.now.sh sfo,bru,gru 1 5
|
||||
```
|
||||
|
||||
@@ -1,31 +1,30 @@
|
||||
# `now scale ls` is deprecated
|
||||
# `vercel scale ls` is deprecated
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
We have stopped supporting this command, in favor of
|
||||
better alternatives.
|
||||
|
||||
`now scale ls` used to list all the scaling rules
|
||||
`vercel 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 `now scale ls` to list all your deployments
|
||||
and their scaling rules, first use `now ls` to find
|
||||
Instead of using `vercel scale ls` to list all your deployments
|
||||
and their scaling rules, first use `vercel ls` to find
|
||||
your deployment:
|
||||
|
||||
```console
|
||||
now ls
|
||||
vercel ls
|
||||
```
|
||||
|
||||
Then, select the URL of your deployment, which uniquely identifies it, and run:
|
||||
|
||||
```console
|
||||
now inspect my-deployment-12345.now.sh
|
||||
vercel 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.
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
You tried to use `now scale` on a path alias (`now alias -r rules.json`).
|
||||
You tried to use `vercel scale` on a path alias (`vercel 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 `now alias ls <id>`.
|
||||
You can view path aliases by running `vercel alias ls <id>`.
|
||||
|
||||
Documentation for Path Aliases can be found [here](https://vercel.com/docs/features/path-aliases).
|
||||
|
||||
@@ -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 `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.
|
||||
- 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.
|
||||
|
||||
@@ -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 `now 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 `vercel switch` to select the team or user that owns the domain.
|
||||
|
||||
@@ -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
|
||||
|
||||
```
|
||||
now scale <deployment> 0 10
|
||||
vercel scale <deployment> 0 10
|
||||
```
|
||||
|
||||
@@ -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 `now logs <url>`)
|
||||
will fail as well. Double check your logs (e.g.: by running `vercel logs <url>`)
|
||||
|
||||
46
examples/README.md
vendored
46
examples/README.md
vendored
@@ -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/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
|
||||
- [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
|
||||
|
||||
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 Now](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 Vercel](https://vercel.com/download) and use either of the following commands in your terminal:
|
||||
|
||||
```sh
|
||||
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>
|
||||
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>
|
||||
```
|
||||
|
||||
Deploying your project takes seconds and can be done with **just a single command**:
|
||||
|
||||
```sh
|
||||
now # Deploys the project with Now
|
||||
vercel # Deploy your project with the CLI
|
||||
```
|
||||
|
||||
With the `now` command, your project will be built and served by Now, providing you with a URL that can be shared immediately.
|
||||
With the `vercel` command, your project will be built and served by Vercel, 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 now 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 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/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) |
|
||||
| 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) |
|
||||
|
||||
## 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 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.
|
||||
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.
|
||||
|
||||
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 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.
|
||||
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.
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
We actively encourage our community to raise issues and provide feedback on areas of Now Examples that could be improved.
|
||||
We actively encourage our community to raise issues and provide feedback on areas of 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
|
||||
|
||||
Now Examples is an open source project released under the [MIT License](https://github.com/zeit/docs/blob/master/LICENSE.md).
|
||||
This repository is an open source project. See the [License](https://github.com/vercel/vercel/blob/master/LICENSE).
|
||||
|
||||
## 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/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.
|
||||
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.
|
||||
|
||||
[](https://github.com/zeit/now/discussions)
|
||||
[](https://github.com/vercel/vercel/discussions)
|
||||
|
||||
@@ -6,7 +6,7 @@ This directory is a brief example of an [AMP](https://amp.dev/) site that can be
|
||||
|
||||
Deploy your own AMP project with Vercel.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/amp)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/amp)
|
||||
|
||||
_Live Example: https://amp.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/angular)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/angular)
|
||||
|
||||
_Live Example: https://angular.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/brunch)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/brunch)
|
||||
|
||||
_Live Example: https://brunch.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/create-react-app-functions)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/create-react-app-functions)
|
||||
|
||||
_Live Example: https://create-react-app.now-examples.now.sh/_
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ function App() {
|
||||
</h2>
|
||||
<p>
|
||||
<a
|
||||
href="https://github.com/zeit/now/tree/master/examples/create-react-app"
|
||||
href="https://github.com/vercel/vercel/tree/master/examples/create-react-app"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
|
||||
@@ -6,7 +6,7 @@ This directory is a brief example of using a Custom Build script that can be dep
|
||||
|
||||
Deploy your own Custom Built project with Vercel.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/custom-build)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/custom-build)
|
||||
|
||||
_Live Example: https://custom-build.now-examples.now.sh_
|
||||
|
||||
@@ -15,7 +15,7 @@ _Live Example: https://custom-build.now-examples.now.sh_
|
||||
To get started deploying a Custom Built project with Vercel, you can use the [Vercel CLI](https://vercel.com/download) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ now init custom-build
|
||||
$ vercel init custom-build
|
||||
```
|
||||
|
||||
### Deploying From Your Terminal
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now-examples/tree/master/docusaurus-2)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/docusaurus-2)
|
||||
|
||||
### How We Created This Example
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/docusaurus)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/docusaurus)
|
||||
|
||||
_Live Example: https://docusaurus.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ This directory is a brief example of a [Dojo](https://dojo.io) site that can be
|
||||
|
||||
Deploy your own Dojo project with Vercel.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now-examples/tree/master/dojo)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/dojo)
|
||||
|
||||
### How We Created This Example
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/eleventy)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/eleventy)
|
||||
|
||||
_Live Example: https://eleventy.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/ember)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/ember)
|
||||
|
||||
_Live Example: https://ember.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/gatsby)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/gatsby)
|
||||
|
||||
_Live Example: https://gatsby.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ function Index() {
|
||||
</h2>
|
||||
<p>
|
||||
<a
|
||||
href="https://github.com/zeit/now-examples/blob/master/gatsby-functions"
|
||||
href="https://github.com/vercel/vercel/blob/master/gatsby"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/gridsome)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/gridsome)
|
||||
|
||||
_Live Example: https://gridsome.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/hexo)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/hexo)
|
||||
|
||||
_Live Example: https://hexo.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/hugo)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/hugo)
|
||||
|
||||
_Live Example: https://hugo.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/ionic-angular)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/ionic-angular)
|
||||
|
||||
_Live Example: https://ionic-angular.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/ionic-react)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/ionic-react)
|
||||
|
||||
_Live Example: https://ionic-react.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/jekyll)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/jekyll)
|
||||
|
||||
_Live Example: https://jekyll.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ This directory is a brief example of a [Middleman](https://middlemanapp.com/) si
|
||||
|
||||
Deploy your own Middleman project with Vercel.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/middleman)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/middleman)
|
||||
|
||||
_Live Example: https://middleman.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/nuxtjs)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/nuxtjs)
|
||||
|
||||
_Live Example: https://nuxtjs.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/polymer)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/polymer)
|
||||
|
||||
_Live Example: https://polymer.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/preact)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/preact)
|
||||
|
||||
_Live Example: https://preact.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/saber)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/saber)
|
||||
|
||||
_Live Example: https://saber.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/sapper)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/sapper)
|
||||
|
||||
_Live Example: https://sapper.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# Scully Example
|
||||
|
||||
@@ -8,7 +8,7 @@ This directory is a brief example of a [Scully](https://scully.io) site that can
|
||||
|
||||
Deploy your own Scully project with Vercel.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/scully)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/scully)
|
||||
|
||||
_Live Example: https://scully.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/stencil)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/stencil)
|
||||
|
||||
_Live Example: https://stencil.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/svelte)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/svelte)
|
||||
|
||||
_Live Example: https://svelte.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</h2>
|
||||
<p>
|
||||
<a
|
||||
href="https://github.com/zeit/now/tree/master/examples/svelte"
|
||||
href="https://github.com/vercel/vercel/tree/master/examples/svelte"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener">
|
||||
This project
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/umijs)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/umijs)
|
||||
|
||||
_Live Example: https://umijs.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
[](https://vercel.com/import/project?template=https://github.com/zeit/now/tree/master/examples/vue)
|
||||
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/master/examples/vue)
|
||||
|
||||
_Live Example: https://vue.now-examples.now.sh_
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "Next.js",
|
||||
"slug": "nextjs",
|
||||
"demo": "https://nextjs.now-examples.now.sh",
|
||||
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/next.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/gatsby.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/hexo.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/eleventy.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/docusaurus.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/docusaurus.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/preact.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/dojo.png",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/ember.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/vue.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/scullyio-logo.png",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/ionic.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/angular.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/polymer.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/svelte.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/ionic.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/react.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/gridsome.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/umi.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/svelte.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/saber.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/stencil.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/nuxt.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/hugo.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/hugo.svg",
|
||||
"tagline": "Hugo is the world’s 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/zeit/now/master/packages/frameworks/logos/jekyll.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/brunch.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/middleman.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/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/zeit/now/master/packages/frameworks/logos/other.svg",
|
||||
"logo": "https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/other.svg",
|
||||
"description": "No framework or a unoptimized framework.",
|
||||
"settings": {
|
||||
"buildCommand": {
|
||||
|
||||
@@ -122,7 +122,7 @@ describe('frameworks', () => {
|
||||
.map(f => f.logo)
|
||||
.filter(url => {
|
||||
const prefix =
|
||||
'https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/';
|
||||
'https://raw.githubusercontent.com/vercel/vercel/master/packages/frameworks/logos/';
|
||||
const name = url.replace(prefix, '');
|
||||
return existsSync(path.join(__dirname, '..', 'logos', name)) === false;
|
||||
});
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
"homepage": "https://github.com/zeit/now/blob/master/DEVELOPING_A_RUNTIME.md",
|
||||
"homepage": "https://github.com/vercel/vercel/blob/master/DEVELOPING_A_RUNTIME.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zeit/now.git",
|
||||
"url": "https://github.com/vercel/vercel.git",
|
||||
"directory": "packages/now-build-utils"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -48,7 +48,7 @@ export default async function download(
|
||||
} = meta || {};
|
||||
|
||||
if (isDev || skipDownload) {
|
||||
// In `now dev`, the `download()` function is a no-op because
|
||||
// In `vercel 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;
|
||||
|
||||
@@ -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 `now dev`
|
||||
// Use the system-installed version of `node` in PATH for `vercel dev`
|
||||
const latest = getLatestNodeVersion();
|
||||
return { ...latest, runtime: 'nodejs' };
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ export interface BuildOptions {
|
||||
config: Config;
|
||||
|
||||
/**
|
||||
* Metadata related to the invoker of the builder, used by `now dev`.
|
||||
* Metadata related to the invoker of the builder, used by `vercel 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 `now dev` server to
|
||||
* Process ID number of the dev server. Useful for the `vercel dev` server to
|
||||
* shut down the dev server once an HTTP request has been fulfilled.
|
||||
*/
|
||||
pid: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)*
|
||||
_Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)_
|
||||
|
||||
---
|
||||
|
||||
@@ -13,8 +13,7 @@ npx degit sveltejs/template svelte-app
|
||||
cd svelte-app
|
||||
```
|
||||
|
||||
*Note that you will need to have [Node.js](https://nodejs.org) installed.*
|
||||
|
||||
_Note that you will need to have [Node.js](https://nodejs.org) installed._
|
||||
|
||||
## Get started
|
||||
|
||||
@@ -35,7 +34,6 @@ Navigate to [localhost:5000](http://localhost:5000). You should see your app run
|
||||
|
||||
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:
|
||||
@@ -46,48 +44,12 @@ 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:
|
||||
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"
|
||||
```
|
||||
|
||||
|
||||
## Deploying to the web
|
||||
|
||||
### With [now](https://zeit.co/now)
|
||||
|
||||
Install `now` if you haven't already:
|
||||
|
||||
```bash
|
||||
npm install -g now
|
||||
```
|
||||
|
||||
Then, from within your project folder:
|
||||
|
||||
```bash
|
||||
cd public
|
||||
now deploy --name my-project
|
||||
```
|
||||
|
||||
As an alternative, use the [Now desktop client](https://zeit.co/download) and simply drag the unzipped project folder to the taskbar icon.
|
||||
|
||||
### With [surge](https://surge.sh/)
|
||||
|
||||
Install `surge` if you haven't already:
|
||||
|
||||
```bash
|
||||
npm install -g surge
|
||||
```
|
||||
|
||||
Then, from within your project folder:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
surge public my-project.surge.sh
|
||||
```
|
||||
|
||||
2
packages/now-build-utils/test/unit.test.js
vendored
2
packages/now-build-utils/test/unit.test.js
vendored
@@ -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 now dev getNodeVersion()', async () => {
|
||||
it('should ignore node version in vercel dev getNodeVersion()', async () => {
|
||||
expect(
|
||||
await getNodeVersion(
|
||||
'/tmp',
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zeit/now.git",
|
||||
"url": "https://github.com/vercel/vercel.git",
|
||||
"directory": "packages/now-cgi"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<p align="center">Develop. Preview. Ship.</p>
|
||||
</p>
|
||||
|
||||
[](https://github.com/zeit/now/discussions)
|
||||
[](https://github.com/vercel/vercel/discussions)
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"homepage": "https://vercel.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zeit/now.git",
|
||||
"url": "https://github.com/vercel/vercel.git",
|
||||
"directory": "packages/now-cli"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -33,13 +33,13 @@ async function main() {
|
||||
// During local development, these secrets will be empty.
|
||||
await createConstants();
|
||||
|
||||
// `now dev` uses chokidar to watch the filesystem, but opts-out of the
|
||||
// `vercel dev` uses chokidar to watch the filesystem, but opts-out of the
|
||||
// `fsevents` feature using `useFsEvents: false`, so delete the module here so
|
||||
// that it is not compiled by ncc, which makes the npm package size larger
|
||||
// than necessary.
|
||||
await remove(join(dirRoot, '../../node_modules/fsevents'));
|
||||
|
||||
// Compile the `doT.js` template files for `now dev`
|
||||
// Compile the `doT.js` template files for `vercel dev`
|
||||
console.log();
|
||||
await execa(process.execPath, [join(__dirname, 'compile-templates.js')], {
|
||||
stdio: 'inherit',
|
||||
|
||||
@@ -5,12 +5,12 @@ const { readFile, writeFile, readdir, remove } = require('fs-extra');
|
||||
async function main() {
|
||||
const dirRoot = join(__dirname, '..');
|
||||
|
||||
// Compile the `doT.js` template files for `now dev`
|
||||
// Compile the `doT.js` template files for `vercel dev`
|
||||
const templatesDir = join(dirRoot, 'src/util/dev/templates');
|
||||
const dotPacker = join(dirRoot, '../../node_modules/dot/bin/dot-packer');
|
||||
await execa(process.execPath, [dotPacker], {
|
||||
cwd: templatesDir,
|
||||
stdio: 'inherit'
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
const files = await readdir(templatesDir);
|
||||
@@ -24,7 +24,7 @@ async function main() {
|
||||
[prettier, '--write', '--single-quote', ...compiledFiles],
|
||||
{
|
||||
cwd: templatesDir,
|
||||
stdio: 'inherit'
|
||||
stdio: 'inherit',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -60,7 +60,7 @@ async function main() {
|
||||
)}`;
|
||||
|
||||
lines.unshift(
|
||||
'import encodeHTML from \'escape-html\';',
|
||||
"import encodeHTML from 'escape-html';",
|
||||
'',
|
||||
...def.split('\n')
|
||||
);
|
||||
|
||||
@@ -212,7 +212,7 @@ async function run({ token, config: { currentTeam } }) {
|
||||
}
|
||||
|
||||
// Check if the provided cardId (in case the user
|
||||
// typed `now billing set-default <some-id>`) is valid
|
||||
// typed `vercel billing set-default <some-id>`) is valid
|
||||
if (cardId) {
|
||||
const label = `Are you sure that you to set this card as the default?`;
|
||||
const confirmation = await promptBool(label, {
|
||||
@@ -287,7 +287,7 @@ async function run({ token, config: { currentTeam } }) {
|
||||
}
|
||||
|
||||
// Shoud check if the provided cardId (in case the user
|
||||
// typed `now billing rm <some-id>`) is valid
|
||||
// typed `vercel billing rm <some-id>`) is valid
|
||||
if (cardId) {
|
||||
const label = `Are you sure that you want to remove this card?`;
|
||||
const confirmation = await promptBool(label);
|
||||
|
||||
@@ -38,7 +38,9 @@ const help = () => {
|
||||
|
||||
${chalk.cyan(`$ ${getPkgName()} dev --listen 8080`)}
|
||||
|
||||
${chalk.gray('–')} Make the \`now dev\` server bind to localhost on port 5000
|
||||
${chalk.gray(
|
||||
'–'
|
||||
)} Make the \`vercel dev\` server bind to localhost on port 5000
|
||||
|
||||
${chalk.cyan(`$ ${getPkgName()} dev --listen 127.0.0.1:5000`)}
|
||||
`);
|
||||
|
||||
@@ -28,7 +28,7 @@ export default async function({ apiUrl, token, debug, args, config }) {
|
||||
let stopSpinner = wait('Fetching teams');
|
||||
|
||||
// We're loading the teams here without `currentTeam`, so that
|
||||
// people can use `now switch` in the case that their
|
||||
// people can use `vercel switch` in the case that their
|
||||
// current team was deleted.
|
||||
const teams = new NowTeams({ apiUrl, token, debug });
|
||||
const list = (await teams.ls()).teams;
|
||||
@@ -75,9 +75,9 @@ export default async function({ apiUrl, token, debug, args, config }) {
|
||||
updateCurrentTeam(config, newTeam);
|
||||
console.log(
|
||||
success(
|
||||
`The team ${chalk.bold(
|
||||
newTeam.name
|
||||
)} (${newTeam.slug}) is now active!`
|
||||
`The team ${chalk.bold(newTeam.name)} (${
|
||||
newTeam.slug
|
||||
}) is now active!`
|
||||
)
|
||||
);
|
||||
return 0;
|
||||
@@ -110,7 +110,7 @@ export default async function({ apiUrl, token, debug, args, config }) {
|
||||
return {
|
||||
name,
|
||||
value: slug,
|
||||
short: slug
|
||||
short: slug,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -123,7 +123,7 @@ export default async function({ apiUrl, token, debug, args, config }) {
|
||||
choices.unshift({
|
||||
name: userEntryName,
|
||||
value: user.email,
|
||||
short: user.username
|
||||
short: user.username,
|
||||
});
|
||||
|
||||
// Let's bring the current team to the beginning of the list
|
||||
@@ -145,7 +145,7 @@ export default async function({ apiUrl, token, debug, args, config }) {
|
||||
message,
|
||||
choices,
|
||||
separator: false,
|
||||
eraseFinalAnswer: true
|
||||
eraseFinalAnswer: true,
|
||||
});
|
||||
|
||||
// Abort
|
||||
|
||||
@@ -157,7 +157,7 @@ const main = async argv_ => {
|
||||
|
||||
console.log(
|
||||
info(
|
||||
`Changelog: https://github.com/zeit/now/releases/tag/vercel@${update.latest}`
|
||||
`Changelog: https://github.com/vercel/vercel/releases/tag/vercel@${update.latest}`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import chalk from 'chalk';
|
||||
import * as ERRORS from '../errors-ts';
|
||||
import { Output } from '../output';
|
||||
import dnsTable from '../format-dns-table';
|
||||
import { getCommandName } from '../pkg-name';
|
||||
|
||||
export default function handleCertError<T>(
|
||||
output: Output,
|
||||
@@ -64,7 +65,7 @@ export default function handleCertError<T>(
|
||||
`Alternatively, you can issue a certificate solving DNS challenges manually after running:`
|
||||
);
|
||||
output.print(
|
||||
` ${chalk.cyan(`now certs issue --challenge-only <cns>`)}\n`
|
||||
` ${getCommandName(`certs issue --challenge-only <cns>`)}\n`
|
||||
);
|
||||
output.print(' Read more: https://err.sh/now/dns-configuration-error\n');
|
||||
} else {
|
||||
|
||||
@@ -38,6 +38,7 @@ import {
|
||||
} from './types';
|
||||
import { normalizeRoutes } from '@vercel/routing-utils';
|
||||
import getUpdateCommand from '../get-update-command';
|
||||
import { getTitleName } from '../pkg-name';
|
||||
|
||||
interface BuildMessage {
|
||||
type: string;
|
||||
@@ -248,9 +249,9 @@ export async function executeBuild(
|
||||
} as BuildResult;
|
||||
} else {
|
||||
throw new Error(
|
||||
`Now CLI does not support builder version ${
|
||||
`${getTitleName()} CLI does not support builder version ${
|
||||
builder.version
|
||||
}.\nPlease run \`${await getUpdateCommand()}\` to update Now CLI.`
|
||||
}.\nPlease run \`${await getUpdateCommand()}\` to update to the latest CLI.`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -413,7 +414,7 @@ export async function getBuildMatches(
|
||||
if (src[0] === '/') {
|
||||
// Remove a leading slash so that the globbing is relative to `cwd`
|
||||
// instead of the root of the filesystem. This matches the behavior
|
||||
// of Now deployments.
|
||||
// of Vercel deployments.
|
||||
src = src.substring(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -678,7 +678,7 @@ export default class DevServer {
|
||||
|
||||
async validateNowConfig(config: NowConfig): Promise<void> {
|
||||
if (config.version === 1) {
|
||||
this.output.error('Only `version: 2` is supported by `now dev`');
|
||||
this.output.error('Cannot run `version: 1` projects.');
|
||||
await this.exit(1);
|
||||
return;
|
||||
}
|
||||
@@ -745,7 +745,7 @@ export default class DevServer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Launches the `now dev` server.
|
||||
* Launches the `vercel dev` server.
|
||||
*/
|
||||
async start(...listenSpec: ListenSpec): Promise<void> {
|
||||
if (!fs.existsSync(this.cwd)) {
|
||||
@@ -807,7 +807,7 @@ export default class DevServer {
|
||||
});
|
||||
}, ms('30s'));
|
||||
|
||||
// Now Builders that do not define a `shouldServe()` function need to be
|
||||
// Builders that do not define a `shouldServe()` function need to be
|
||||
// executed at boot-up time in order to get the initial assets and/or routes
|
||||
// that can be served by the builder.
|
||||
const blockingBuilds = Array.from(this.buildMatches.values()).filter(
|
||||
@@ -899,7 +899,7 @@ export default class DevServer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Shuts down the `now dev` server, and cleans up any temporary resources.
|
||||
* Shuts down the `vercel dev` server, and cleans up any temporary resources.
|
||||
*/
|
||||
async stop(exitCode?: number): Promise<void> {
|
||||
const { devProcess } = this;
|
||||
@@ -1091,7 +1091,7 @@ export default class DevServer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the response `headers` including the Now headers to `res`.
|
||||
* Sets the response `headers` including the platform headers to `res`.
|
||||
*/
|
||||
setResponseHeaders(
|
||||
res: http.ServerResponse,
|
||||
@@ -1267,7 +1267,7 @@ export default class DevServer {
|
||||
};
|
||||
|
||||
/**
|
||||
* Serve project directory as a Now v2 deployment.
|
||||
* Serve project directory as a v2 deployment.
|
||||
*/
|
||||
serveProjectAsNowV2 = async (
|
||||
req: http.IncomingMessage,
|
||||
@@ -1528,10 +1528,10 @@ export default class DevServer {
|
||||
}
|
||||
|
||||
// Before doing any asset matching, check if this builder supports the
|
||||
// `startDevServer()` "optimization". In this case, the now dev server invokes
|
||||
// `startDevServer()` "optimization". In this case, the vercel dev server invokes
|
||||
// `startDevServer()` on the builder for every HTTP request so that it boots
|
||||
// up a single-serve dev HTTP server that now dev will proxy this HTTP request
|
||||
// to. Once the proxied request is finished, now dev shuts down the dev
|
||||
// up a single-serve dev HTTP server that vercel dev will proxy this HTTP request
|
||||
// to. Once the proxied request is finished, vercel dev shuts down the dev
|
||||
// server child process.
|
||||
const { builder, package: builderPkg } = match.builderWithPkg;
|
||||
if (typeof builder.startDevServer === 'function') {
|
||||
@@ -1989,7 +1989,7 @@ function close(server: http.Server | httpProxy): Promise<void> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a (fake) Now tracing ID for an HTTP request.
|
||||
* Generates a (fake) tracing ID for an HTTP request.
|
||||
*
|
||||
* Example: dev1:q4wlg-1562364135397-7a873ac99c8e
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ import bytes from 'bytes';
|
||||
import info from './output/info';
|
||||
import errorOutput from './output/error';
|
||||
import { APIError } from './errors-ts';
|
||||
import { getCommandName } from './pkg-name';
|
||||
|
||||
export default function handleError(
|
||||
error: string | Error | APIError,
|
||||
@@ -22,7 +23,10 @@ export default function handleError(
|
||||
if (status === 403) {
|
||||
console.error(
|
||||
errorOutput(
|
||||
message || 'Authentication error. Run `now login` to log-in again.'
|
||||
message ||
|
||||
`Authentication error. Run ${getCommandName(
|
||||
'login'
|
||||
)} to log-in again.`
|
||||
)
|
||||
);
|
||||
} else if (status === 429) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import os from 'os';
|
||||
import pkg from './pkg';
|
||||
|
||||
export default `now ${pkg.version} node-${process.version} ${os.platform()} (${os.arch()})`;
|
||||
export default `${pkg.name} ${pkg.version} node-${
|
||||
process.version
|
||||
} ${os.platform()} (${os.arch()})`;
|
||||
|
||||
@@ -15,5 +15,5 @@ $ au new
|
||||
Once initialized, you can deploy the Aurelia example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -15,5 +15,5 @@ $ npx create-react-app my-app
|
||||
Once initialized, you can deploy the React example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -15,5 +15,5 @@ $ gridsome create my-website
|
||||
Once initialized, you can deploy the Gridsome example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -15,5 +15,5 @@ $ marko create my-project
|
||||
Once initialized, you can deploy the Marko.js example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -4,10 +4,10 @@ This directory is a brief example of a [Mithril](https://mithril.js.org/) app th
|
||||
|
||||
## How we created this example
|
||||
|
||||
To get started with Mithril on Vercel, you can use the [Now CLI](https://vercel.com/download) to initialize the project:
|
||||
To get started with Mithril on Vercel, you can use the [Vercel CLI](https://vercel.com/download) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ now init mithril
|
||||
$ vercel init mithril
|
||||
```
|
||||
|
||||
## Deploying this Example
|
||||
@@ -15,5 +15,5 @@ $ now init mithril
|
||||
Once initialized, you can deploy the Mithril example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -4,10 +4,10 @@ This directory is a brief example of a [Riot.js](https://riot.js.org/) app that
|
||||
|
||||
## How we created this example
|
||||
|
||||
To get started with Riot on Vercel, you can use the [Now CLI](https://vercel.com/download) to initialize the project:
|
||||
To get started with Riot on Vercel, you can use the [Vercel CLI](https://vercel.com/download) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ now init riot
|
||||
$ vercel init riot
|
||||
```
|
||||
|
||||
## Deploying this Example
|
||||
@@ -15,5 +15,5 @@ $ now init riot
|
||||
Once initialized, you can deploy the Riot example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Charge.js Example
|
||||
|
||||
This directory is a brief example of a [Charge.js](https://charge.js.org/) site that can be deployed to Vercel with zero configuration.
|
||||
This directory is a brief example of a [Charge.js](https://charge.js.org) site that can be deployed to Vercel with zero configuration.
|
||||
|
||||
## How we created this example
|
||||
|
||||
To get started with Charge.js on Vercel, you can use the [Now CLI](https://vercel.com/download) to initialize the project:
|
||||
To get started with Charge.js on Vercel, you can use the [Vercel CLI](https://vercel.com/download) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ now init charge
|
||||
$ vercel init charge
|
||||
```
|
||||
|
||||
## Deploying this Example
|
||||
@@ -15,5 +15,5 @@ $ now init charge
|
||||
Once initialized, you can deploy the Charge.js example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -15,5 +15,5 @@ $ brunch new project-name -s es6
|
||||
Once initialized, you can deploy the Brunch example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -15,5 +15,5 @@ $ npx ember-cli new ember-project
|
||||
Once initialized, you can deploy the Ember example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
$ vercel
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>A simple deployment with the Now API!</title>
|
||||
<title>A simple deployment with the Vercel API!</title>
|
||||
<link rel="stylesheet" href="/www/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -781,7 +781,7 @@ test(
|
||||
test(
|
||||
'[vercel dev] support legacy `@now` scope runtimes',
|
||||
testFixtureStdio('legacy-now-runtime', async testPath => {
|
||||
await testPath(200, '/', /A simple deployment with the Now API!/m);
|
||||
await testPath(200, '/', /A simple deployment with the Vercel API!/m);
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
25
packages/now-cli/test/integration.js
vendored
25
packages/now-cli/test/integration.js
vendored
@@ -371,7 +371,7 @@ test('deploy using --local-config flag above target', async t => {
|
||||
t.regex(host, /root-level/gm, `Expected "root-level" but received "${host}"`);
|
||||
});
|
||||
|
||||
test('Deploy `api-env` fixture and test `now env` command', async t => {
|
||||
test('Deploy `api-env` fixture and test `vercel env` command', async t => {
|
||||
const target = fixture('api-env');
|
||||
|
||||
async function nowDeploy() {
|
||||
@@ -614,6 +614,7 @@ test('Deploy `api-env` fixture and test `now env` command', async t => {
|
||||
await nowEnvRemoveWithArgs();
|
||||
await nowEnvRemoveWithNameOnly();
|
||||
await nowEnvLsIsEmpty();
|
||||
fs.unlinkSync(path.join(target, '.env'));
|
||||
});
|
||||
|
||||
test('deploy with metadata containing "=" in the value', async t => {
|
||||
@@ -2048,7 +2049,7 @@ test('print correct link in legacy warning', async t => {
|
||||
t.regex(stderr, /migrate-to-vercel/);
|
||||
});
|
||||
|
||||
test('`now rm` removes a deployment', async t => {
|
||||
test('`vercel rm` removes a deployment', async t => {
|
||||
const directory = fixture('builds');
|
||||
|
||||
const { stdout } = await execa(
|
||||
@@ -2080,7 +2081,7 @@ test('`now rm` removes a deployment', async t => {
|
||||
t.is(exitCode, 0);
|
||||
});
|
||||
|
||||
test('`now rm` 404 exits quickly', async t => {
|
||||
test('`vercel rm` 404 exits quickly', async t => {
|
||||
const start = Date.now();
|
||||
const { exitCode, stderr, stdout } = await execute([
|
||||
'rm',
|
||||
@@ -2138,7 +2139,7 @@ test('invalid deployment, projects and alias names', async t => {
|
||||
]);
|
||||
});
|
||||
|
||||
test('now certs ls', async t => {
|
||||
test('vercel certs ls', async t => {
|
||||
const output = await execute(['certs', 'ls']);
|
||||
|
||||
console.log(output.stderr);
|
||||
@@ -2149,7 +2150,7 @@ test('now certs ls', async t => {
|
||||
t.regex(output.stderr, /certificates? found under/gm, formatOutput(output));
|
||||
});
|
||||
|
||||
test('now certs ls --next=123456', async t => {
|
||||
test('vercel certs ls --next=123456', async t => {
|
||||
const output = await execute(['certs', 'ls', '--next=123456']);
|
||||
|
||||
console.log(output.stderr);
|
||||
@@ -2160,7 +2161,7 @@ test('now certs ls --next=123456', async t => {
|
||||
t.regex(output.stderr, /No certificates found under/gm, formatOutput(output));
|
||||
});
|
||||
|
||||
test('now hasOwnProperty not a valid subcommand', async t => {
|
||||
test('vercel hasOwnProperty not a valid subcommand', async t => {
|
||||
const output = await execute(['hasOwnProperty']);
|
||||
|
||||
console.log(output.stderr);
|
||||
@@ -2211,7 +2212,7 @@ test('create zero-config deployment', async t => {
|
||||
);
|
||||
});
|
||||
|
||||
test('now secret add', async t => {
|
||||
test('vercel secret add', async t => {
|
||||
context.secretName = `my-secret-${Date.now().toString(36)}`;
|
||||
const value = 'https://my-secret-endpoint.com';
|
||||
|
||||
@@ -2224,7 +2225,7 @@ test('now secret add', async t => {
|
||||
t.is(output.exitCode, 0, formatOutput(output));
|
||||
});
|
||||
|
||||
test('now secret ls', async t => {
|
||||
test('vercel secret ls', async t => {
|
||||
const output = await execute(['secret', 'ls']);
|
||||
|
||||
console.log(output.stderr);
|
||||
@@ -2236,7 +2237,7 @@ test('now secret ls', async t => {
|
||||
t.regex(output.stdout, new RegExp(), formatOutput(output));
|
||||
});
|
||||
|
||||
test('now secret rename', async t => {
|
||||
test('vercel secret rename', async t => {
|
||||
const nextName = `renamed-secret-${Date.now().toString(36)}`;
|
||||
const output = await execute([
|
||||
'secret',
|
||||
@@ -2254,7 +2255,7 @@ test('now secret rename', async t => {
|
||||
context.secretName = nextName;
|
||||
});
|
||||
|
||||
test('now secret rm', async t => {
|
||||
test('vercel secret rm', async t => {
|
||||
const output = await execute(['secret', 'rm', context.secretName, '-y']);
|
||||
|
||||
console.log(output.stderr);
|
||||
@@ -2802,7 +2803,7 @@ test('use `rootDirectory` from project when deploying', async t => {
|
||||
});
|
||||
});
|
||||
|
||||
test('now deploy with unknown `VERCEL_ORG_ID` or `VERCEL_PROJECT_ID` should error', async t => {
|
||||
test('vercel deploy with unknown `VERCEL_ORG_ID` or `VERCEL_PROJECT_ID` should error', async t => {
|
||||
const output = await execute(['deploy'], {
|
||||
env: { VERCEL_ORG_ID: 'asdf', VERCEL_PROJECT_ID: 'asdf' },
|
||||
});
|
||||
@@ -2811,7 +2812,7 @@ test('now deploy with unknown `VERCEL_ORG_ID` or `VERCEL_PROJECT_ID` should erro
|
||||
t.is(output.stderr.includes('Project not found'), true, formatOutput(output));
|
||||
});
|
||||
|
||||
test('now env with unknown `VERCEL_ORG_ID` or `VERCEL_PROJECT_ID` should error', async t => {
|
||||
test('vercel env with unknown `VERCEL_ORG_ID` or `VERCEL_PROJECT_ID` should error', async t => {
|
||||
const output = await execute(['env'], {
|
||||
env: { VERCEL_ORG_ID: 'asdf', VERCEL_PROJECT_ID: 'asdf' },
|
||||
});
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
# now client
|
||||
# @vercel/client
|
||||
|
||||
[](https://travis-ci.org/zeit/now-client)
|
||||
[](https://github.com/zeit/now/discussions)
|
||||
[](https://github.com/vercel/vercel/discussions)
|
||||
|
||||
The official Node.js client for deploying to [Now](https://vercel.com/now). It supports v1 and v2 deployments.
|
||||
The official Node.js client for deploying to [Vercel](https://vercel.com).
|
||||
|
||||
## Usage
|
||||
|
||||
Firstly, install the package:
|
||||
|
||||
```bash
|
||||
npm install now-client
|
||||
npm install @vercel/client
|
||||
# or
|
||||
yarn add now-client
|
||||
yarn add @vercel/client
|
||||
```
|
||||
|
||||
Next, load it:
|
||||
|
||||
```js
|
||||
// v2
|
||||
const { createDeployment } = require('now-client');
|
||||
const { createDeployment } = require('@vercel/client');
|
||||
// v1
|
||||
const { createLegacyDeployment } = require('now-client');
|
||||
const { createLegacyDeployment } = require('@vercel/client');
|
||||
```
|
||||
|
||||
Then call inside a `for...of` loop to follow the progress with the following arguments:
|
||||
@@ -35,7 +34,7 @@ async function deploy() {
|
||||
|
||||
for await (const event of createDeployment({
|
||||
token: process.env.TOKEN,
|
||||
path: '/Users/zeit-user/projects/front',
|
||||
path: '/Users/vercel-user/projects/front',
|
||||
})) {
|
||||
if (event.type === 'ready') {
|
||||
deployment = event.payload;
|
||||
@@ -69,5 +68,5 @@ Full list of events:
|
||||
You can also get the events set programmatically:
|
||||
|
||||
```js
|
||||
import { EVENTS } from 'now-client';
|
||||
import { EVENTS } from '@vercel/client';
|
||||
```
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zeit/now.git",
|
||||
"url": "https://github.com/vercel/vercel.git",
|
||||
"directory": "packages/now-client"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -40,7 +40,7 @@ async function initPrivateGit(credentials: string) {
|
||||
* Since `go build` does not support files that begin with a square bracket,
|
||||
* we must rename to something temporary to support Path Segments.
|
||||
* The output file is not renamed because v3 builders can't rename outputs
|
||||
* which works great for this feature. We also need to add a suffix during `now dev`
|
||||
* which works great for this feature. We also need to add a suffix during `vercel dev`
|
||||
* since the entrypoint is already stripped of its suffix before build() is called.
|
||||
*/
|
||||
async function getRenamedEntrypoint(
|
||||
@@ -132,14 +132,14 @@ Learn more: https://vercel.com/docs/runtimes#official-runtimes/go
|
||||
const parsedAnalyzed = JSON.parse(analyzed) as Analyzed;
|
||||
|
||||
if (meta.isDev) {
|
||||
// Create cache so Go rebuilds fast with `now dev`
|
||||
// Create cache so Go rebuilds fast with `vercel dev`
|
||||
// Old versions of the CLI don't assign this property
|
||||
const { devCacheDir = join(workPath, '.now', 'cache') } = meta;
|
||||
goPath = join(devCacheDir, 'now-go', basename(entrypoint, '.go'));
|
||||
const destNow = join(goPath, 'src', 'lambda');
|
||||
await download(downloadedFiles, destNow);
|
||||
downloadedFiles = await glob('**', destNow);
|
||||
downloadPath = destNow;
|
||||
const destLambda = join(goPath, 'src', 'lambda');
|
||||
await download(downloadedFiles, destLambda);
|
||||
downloadedFiles = await glob('**', destLambda);
|
||||
downloadPath = destLambda;
|
||||
}
|
||||
|
||||
// find `go.mod` in downloadedFiles
|
||||
@@ -348,7 +348,7 @@ Learn more: https://vercel.com/docs/runtimes#official-runtimes/go
|
||||
throw err;
|
||||
}
|
||||
if (meta.isDev) {
|
||||
// caching for `now dev`
|
||||
// caching for `vercel dev`
|
||||
await move(
|
||||
join(baseGoModPath, 'go.mod'),
|
||||
join(baseGoModPath, 'go.mod.bk'),
|
||||
|
||||
@@ -2,9 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
now "github.com/zeit/now-go-bridge/go/bridge"
|
||||
vc "github.com/vercel/go-bridge/go/bridgee"
|
||||
)
|
||||
|
||||
func main() {
|
||||
now.Start(http.HandlerFunc(__NOW_HANDLER_FUNC_NAME))
|
||||
vc.Start(http.HandlerFunc(__NOW_HANDLER_FUNC_NAME))
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"net/http"
|
||||
"__NOW_HANDLER_PACKAGE_NAME"
|
||||
|
||||
now "github.com/zeit/now-go-bridge/go/bridge"
|
||||
vc "github.com/vercel/go-bridge/go/bridge"
|
||||
)
|
||||
|
||||
func main() {
|
||||
now.Start(http.HandlerFunc(__NOW_HANDLER_FUNC_NAME))
|
||||
vc.Start(http.HandlerFunc(__NOW_HANDLER_FUNC_NAME))
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zeit/now.git",
|
||||
"url": "https://github.com/vercel/vercel.git",
|
||||
"directory": "packages/now-go"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user