Skip to content

Bundle JavaScript for GAS

Bash
npm run bundle
# or
task bundle
  • Bundles TypeScript source directly from src/index.ts into a single file using Rollup + @rollup/plugin-typescript.
  • Output format is IIFE (immediately invoked function expression) for GAS compatibility.
  • The bundled file is placed at gaslamp/gaslamp.bundle.js.
  • Bundle settings are configured in rollup.config.js.

Warning: Do not delete the entire gaslamp/ directory. It contains both the bundled file and handwritten GAS scripts. If you need to reset the bundle, delete only gaslamp/gaslamp.bundle.js.

References

  • rollup.config.js — Rollup bundler configuration
  • package.json — npm scripts
  • Push — Push to Google Apps Script via clasp
  • Build — Type-check TypeScript
  • Release — Release a new version