Files
webstudio/.devcontainer/postinstall.sh
T
Ivan Starkov 2e236917a7 build: Add devcontainer (#3429)
## Description

Allow development in devcontainers, simplifies initial setup

Open project in vscode (and accept open in devcontainer) or in
codespaces, wait setup to complete

run
```
pnpm dev
```

<img width="436" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f03fdc99-5c46-4de5-be9c-2bb9420afc99">





## 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
2024-05-28 14:15:55 +03:00

28 lines
733 B
Bash
Executable File

#!/bin/bash
echo 'eval "$(fzf --bash)"' >> /home/node/.bashrc
mkdir -p /home/node/.local/fzf
touch /home/node/.local/fzf/.bash_history
echo 'export HISTFILE=/home/node/.local/fzf/.bash_history' >> "/home/node/.bashrc"
cd /workspaces/webstudio
sudo corepack enable
corepack install
pnpm config set store-dir $HOME/.pnpm-store
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
find . -name 'lib' -type d -prune -exec rm -rf '{}' +
find . -name 'build' -type d -prune -exec rm -rf '{}' +
find . -name 'dist' -type d -prune -exec rm -rf '{}' +
find . -name '.cache' -type d -prune -exec rm -rf '{}' +
find . -name '.pnpm-store' -type d -prune -exec rm -rf '{}' +
pnpm install
pnpm run build
pnpm migrations migrate