@vegasjs/vegas
v0.1.5
Published
The SPA build tool for GAS platform
Maintainers
Readme
Vegas
It feels like Vite, and it really is Vite (quick!).
Vegas is a tool for building SPAs on the GAS platform, powered by Vite, which significantly improves the frontend development experience.
⚠ Breaking changes ⚠
This project is in the experimental stage and will undergo frequent breaking changes.
Features
- Automatically detects client entry points
- Build flow optimized for the GAS platform
- Includes a client library to call GAS functions
- Compatible with Vite plugins
Quick Start
Development
npx vegas # start development server
npx vegas dev # alternative development command
npx vegas serve # further alternativeProduction
npx vegas preview # locally preview production build
npx vegas build # build for productionProject Structure
Basic SPA
src/
├─ client/
│ └─ main.tsx // client entry ( to: dist/index.html )
└─ server/
└─ Code.tsMulti Front SPA
src/
├─ client/
│ ├─ sub1/
│ │ └─ main.tsx // client entry ( to: dist/sub1.html )
│ └─ main.tsx // client entry ( to: dist/index.html )
└─ server/
└─ Code.tsGAS Only (No SPA)
src/
└─ server/
└─ Code.tsor
src/
└─ Code.tsPlease add the appType setting to vegas.config.ts.
import { defineConfig } from "@vegasjs/vegas";
export default defineConfig({
appType: "script",
});Supported GAS APIs (Local Runtime)
- ✅: support
- 🧪: require tests
- 🛠️: under development
- ❌: no implementation (undefined)
| API | Status | | ----------------- | :----: | | HtmlService | 🛠️ | | PropertiesService | 🧪 | | CacheService | 🧪 | | LockService | 🛠️ | | SpreadsheetApp | 🛠️ | | UrlFetchApp | 🛠️ | | Utilities | 🛠️ | | Session | 🧪 | | Logger / console | 🛠️ | | Others | ❌ |
