{"id":25615,"library":"gasup","title":"Gasup","description":"A CLI tool for bundling Google Apps Script (GAS) projects using esbuild and the esbuild-gas-plugin. Version 1.0.10 provides commands to initialize config, build, and watch for changes. It handles GAS-specific optimizations, copies appsscript.json and HTML files to the output directory, and supports TypeScript. Differentiates from other GAS bundlers by integrating directly with esbuild and providing an interactive configuration wizard.","status":"active","version":"1.0.10","language":"javascript","source_language":"en","source_url":"https://github.com/mohhh-ok/gasup","tags":["javascript","gas","gasup","cli","google apps script","typescript"],"install":[{"cmd":"npm install gasup","lang":"bash","label":"npm"},{"cmd":"yarn add gasup","lang":"bash","label":"yarn"},{"cmd":"pnpm add gasup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core bundler used for building the output file","package":"esbuild","optional":false},{"reason":"Plugin for esbuild that optimizes code for Google Apps Script","package":"esbuild-gas-plugin","optional":false}],"imports":[{"note":"Config is a named export, not default.","wrong":"import Config from 'gasup'","symbol":"Config","correct":"import { Config } from 'gasup'"},{"note":"Run via npx or specify in npm scripts to avoid global install.","wrong":"gasup init","symbol":"gasup CLI","correct":"npx gasup init"},{"note":"Functions must be assigned to global to be accessible in GAS; plain function declarations won't work.","wrong":"function myFunction() {}","symbol":"global functions","correct":"(global as any).myFunction = () => {}"}],"quickstart":{"code":"// Install gasup as dev dependency\nnpm install -D gasup\n\n// Add scripts to package.json\n{\n  \"scripts\": {\n    \"build\": \"gasup\",\n    \"dev\": \"gasup --watch\",\n    \"init\": \"gasup init\",\n    \"config\": \"gasup config\"\n  }\n}\n\n// Initialize configuration\nnpm run init\n\n// Bundle your project\nnpm run build\n\n// Push to Google Apps Script using clasp\nnpx @google/clasp push","lang":"typescript","description":"Shows installation, npm scripts setup, configuration via init command, building, and pushing with clasp."},"warnings":[{"fix":"Use (global as any).functionName = () => { ... }","message":"Functions must be assigned to the global object; standard function declarations are not exposed to GAS.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure file is named correctly and uses named export.","message":"Configuration file must be named gasup.config.ts (or .js) and export a Config object.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Create gasup.config.ts with export default config; remove old config.json","message":"Version 1.0.0 introduced a breaking change: configuration format changed from JSON to TypeScript config file.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Store custom files outside the output directory.","message":"The output directory (default dist/) is overwritten on each build. Do not place other files there.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Place HTML files in the root or adjust config to include them.","message":"HTML files are copied automatically; but only if they are in the project root or specified.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install -D gasup' or use 'npx gasup'","cause":"gasup is not installed or not in the current directory's node_modules.","error":"Error: Cannot find module 'gasup'"},{"fix":"Change 'import Config from \"gasup\"' to 'import { Config } from \"gasup\"'","cause":"Using default import instead of named import for Config type.","error":"TypeError: (0 , gasup_1.default) is not a function"},{"fix":"Assign functions to (global as any) as shown in the documentation.","cause":"Functions intended for GAS are not exposed to the global scope.","error":"ReferenceError: myFunction is not defined"},{"fix":"Create appsscript.json in the same directory as gasup.config.ts.","cause":"appsscript.json is missing from the project root.","error":"ENOENT: no such file or directory, open 'dist/appsscript.json'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}