Add vercelignore to templates (#2299)

## Description

This avoid uploading builds/caches etc onto vercel

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
This commit is contained in:
Ivan Starkov authored and GitHub committed 2023-09-12 07:59:35 +03:00
1 parent a46367357c
commit 7835607f4e
4 files changed
+29

No files matched your search

@@ -0,0 +1,8 @@
node_modules
.cache
.env
.vercel
.webstudio
build
public/build
+7
View File
@@ -11,6 +11,13 @@ export const templates: Record<ProjectTarget, Folder> = {
defaults: {
name: "defaults",
files: [
{
name: ".vercelignore",
content:
"node_modules\n\n.cache\n.env\n.vercel\n.webstudio\nbuild\npublic/build\n",
encoding: "utf-8",
merge: false,
},
{
name: "package.json",
content:
+6
View File
@@ -13,6 +13,12 @@ import pc from "picocolors";
export const initFlow = async (
options: StrictYargsOptionsToInterface<typeof buildOptions>
) => {
await prompt({
type: "text",
name: "folderName",
message: "Please enter a project name",
});
const isProjectConfigured = await isFileExists(".webstudio/config.json");
let shouldInstallDeps = false;
let folderName;
@@ -0,0 +1,8 @@
node_modules
.cache
.env
.vercel
.webstudio
build
public/build