Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

gas-bun

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gas-bun

Modern build tool for Google Apps Script development with Bun

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
13
116.67%
Maintainers
1
Weekly downloads
 
Created
Source

Logo

gas-bun

NPM Version Built with Bun CI License

Modern build tool for Google Apps Script development with Bun

Features

  • 🚀 Fast builds with Bun
  • 📦 TypeScript support out of the box
  • 🔄 Automatic export to global functions
  • 🛠️ Project scaffolding CLI
  • 📝 Type-safe development with @types/google-apps-script

Installation

# Create new project
bunx gas-bun create

# Or add to existing project
bun add -d gas-bun

Usage

Create New Project

bunx gas-bun create

This will:

  • Prompt for project name
  • Copy template files
  • Install dependencies
  • Build the project
  • Optionally create Apps Script project with clasp

Available Commands

# Build TypeScript to GAS
bunx gas-bun build

# Push code to Apps Script
bunx gas-bun push

# Deploy to Apps Script
bunx gas-bun deploy

# Open project in browser
bunx gas-bun open

How It Works

TypeScript to GAS Conversion

Input (index.ts):

function myFunction() {
	Logger.log('Hello via Bun!');
}

export { myFunction };

Output (dist/Code.gs):

function myFunction() {
	Logger.log('Hello via Bun!');
}

Project Structure

your-project/
├── index.ts              # Entry point
├── public/
│   └── appsscript.json   # GAS configuration
├── dist/
│   ├── Code.gs           # Built output
│   └── appsscript.json   # Copied configuration
├── package.json
└── tsconfig.json

API

buildGAS(options)

Build TypeScript code for Google Apps Script.

import { buildGAS } from 'gas-bun';

await buildGAS({
	srcDir: '.',
	distDir: './dist',
	publicDir: './public',
	entryFile: './index.ts',
	outputFile: './dist/Code.gs',
	packageJsonPath: './package.json',
	minify: false,
});

Options

OptionTypeDescription
srcDirstringSource directory
distDirstringOutput directory
publicDirstringPublic assets directory (optional)
entryFilestringEntry point file
outputFilestringOutput file path
packageJsonPathstringPath to package.json
minifybooleanEnable minification (default: false)

Requirements

Contributing

See CONTRIBUTING.md for development guidelines.

License

MIT

Keywords

bun

FAQs

Package last updated on 28 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts