Skip to content

setting up vite template #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions templates/vite-template/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
18 changes: 18 additions & 0 deletions templates/vite-template/e2b.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# You can use most Debian-based base images
FROM node:21-slim

# Install dependencies and customize sandbox
WORKDIR /home/user/app

# Pre-install common dependencies to speed up runtime
RUN npm install -g typescript vue@3

# Copy in package.json and install dependencies
COPY package.json /home/user/app/
RUN npm install --legacy-peer-deps

# Initialize Tailwind
RUN npx tailwindcss init

# Copy in application files
COPY . /home/user/app/
16 changes: 16 additions & 0 deletions templates/vite-template/e2b.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This is a config for E2B sandbox template.
# You can use template ID (sbv0xivbrwoi5ift78dg) or template name (vite-dynamic-sandbox) to create a sandbox:

# Python SDK
# from e2b import Sandbox, AsyncSandbox
# sandbox = Sandbox("vite-dynamic-sandbox") # Sync sandbox
# sandbox = await AsyncSandbox.create("vite-dynamic-sandbox") # Async sandbox

# JS SDK
# import { Sandbox } from 'e2b'
# const sandbox = await Sandbox.create('vite-dynamic-sandbox')

team_id = "35f2ed91-a6af-4e6c-a693-9e9e244fcdbd"
dockerfile = "e2b.Dockerfile"
template_name = "vite-dynamic-sandbox"
template_id = "sbv0xivbrwoi5ift78dg"
13 changes: 13 additions & 0 deletions templates/vite-template/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading