Files
vercel/packages/cli
Nathan Rajlich 1be75712e0 [cli] Add outputBuffer getter and mutable isTTY for tests (#6827)
These changes originally from #6652, but pulled out to be merged
separately.

`outputBuffer` is a simpler way of asserting tests against the CLI
output instead of working directly withe Jest mock function.

`output.isTTY` is also now mutable, so that we can write tests for both
cases when the output is different based on TTY-ness (for example,
see the updated `vc whoami` tests in this PR).
2021-10-12 16:16:55 -07:00
..
2021-10-12 12:56:49 +02:00
2021-08-23 12:04:38 -04:00
2021-09-13 20:20:48 +00:00

Vercel

Develop. Preview. Ship.

Join the community on GitHub Discussions

Usage

Vercel is a platform for static sites and frontend frameworks, built to integrate with your headless content, commerce, or database.

We provide a frictionless developer experience to take care of the hard things: deploy instantly, scale automatically, and serve personalized content around the globe.

We make it easy for frontend teams to develop, preview, and ship delightful user experiences, where performance is the default.

To install the latest version of Vercel CLI, run this command:

npm i -g vercel

To quickly start a new project, run the following commands:

vercel init     # Pick an example project
cd <PROJECT>    # Change directory to the new project
vercel          # Deploy to the cloud

Finally, connect your Git repository to Vercel and deploy with git push.

Documentation

For details on how to use Vercel CLI, check out our documentation.

Local Development

To develop Vercel CLI, first check out the source code, install dependencies, and build all packages:

git clone https://github.com/vercel/vercel.git
cd vercel
yarn
yarn build

At this point you can make modifications to the CLI source code and test them out locally. The CLI source code is located in the packages/cli directory.

cd packages/cli

From within the packages/cli directory, you can use the ts-eager command line tool to quickly excute Vercel CLI from its TypeScript source code directly (without having to manually compile first). For example:

npx ts-eager src
npx ts-eager src login
npx ts-eager src switch --debug
npx ts-eager src dev

When you are satisfied with your changes, make a commit and create a pull request!