@ciderjs/gasbombe
v0.4.4
Published
A TypeScript Project Generator for GoogleAppsScript, available as CLI
Maintainers
Readme
Gasbombe
🛢 'Gasbombe' the TypeScript Project Generator for GoogleAppsScript.
This project provides a command-line interface (CLI) to scaffold new TypeScript projects for Google Apps Script, with templates for Vanilla TS and React.
Features
- CLI Tool: Interactive command-line prompts to guide you through project setup.
- Templates:
- Server-side TypeScript
- Server-side JavaScript
- Server-side TypeScript with CiderJS
- React
- React with CiderJS
- Vue
- Vue with CiderJS
- HTML/JS
- Package Manager Support: Works with npm, Yarn, and pnpm.
Usage
Installation
You can use npx to run the CLI without installing it globally:
npx @ciderjs/gasbombeOr, you can install it globally:
npm install -g @ciderjs/gasbombeHow to Use
Run the command and follow the interactive prompts:
gasbombeYou will be asked for:
- Project name
- Project template (Vanilla TS, React)
- How to set up the Apps Script project (
.clasp.json) - Package manager (npm, yarn, pnpm)
The tool will create a new directory with the specified project name, generate the template files, and install the dependencies.
CLI Options
You can bypass the interactive prompts by providing command-line options. This is useful for scripting and automation.
# Example: Create a new React project with pnpm, creating a new Apps Script project along with it
gasbombe --name my-react-app --template react --clasp create --pkg pnpm| Option | Alias | Argument | Description | Choices |
| :--- | :--- | :--- | :--- | :--- |
| --name | -n | [projectName] | The name of the project to generate. | - |
| --template | -t | [templateType] | The project template to use. | server-ts, server-js, server-ciderjs, react, react-ciderjs, vue, vue-ciderjs, html-js |
| --clasp | -c | [claspOption] | How to set up the .clasp.json file.create and list require prior login to clasp. | create, list, input, skip |
| --pkg | -p | [packageManager] | The package manager to use. | npm, pnpm, yarn |
| --skipInstall | | | Skip installing dependencies. | - |
If any of these options are omitted, you will be prompted to enter the value interactively.
Development
Prerequisites
Setup
Clone the repository and install the dependencies:
git clone https://github.com/luthpg/gasbombe.git
cd gasbombe
pnpm installBuild
To build the project locally:
pnpm run buildThis will generate the necessary files in the dist directory.
License
This project is licensed under the MIT License. See the LICENSE file for details.
