Welcome to Apps Script Engine 👋
Creates boilerplate code for kick-ass Apps Script projects, helping developers quickly set up and start building with Google Apps Script. It intelligently merges language-specific configuration files and applies npm scripts based on the chosen language (JavaScript or TypeScript), ensuring existing project files are not overwritten.
Table of Contents
Prerequisites
Ensure that you have npm and git installed by running:
npm --version
git --version
If you don't have these installed, follow the instructions here for npm and here for git.
Install
This CLI script installs the Apps Script Engine Template. Check out the template's README for details on how to use it.
To install the template, run the following command with an optional directory name:
npx apps-script-engine [directory-name]
If no directory name is provided, it will default to ./apps-script-project.
Usage
To create a new Apps Script project in the current directory:
npx apps-script-engine
To create a new Apps Script project in a specific directory:
npx apps-script-engine my-project-directory
To create a new Apps Script project with TypeScript:
npx apps-script-engine my-ts-project --ts
After running the command, the script will generate the necessary boilerplate files in the specified directory.
Developer Mode
For local development of the apps-script-engine CLI, you can use the DEV_MODE_DIR environment variable. If DEV_MODE_DIR is set to a local path, the CLI will intelligently copy the template files from this local directory, merging them with existing files without overwriting, instead of cloning from the remote Git repository. This is useful for testing changes to the template without pushing them to GitHub.
To use developer mode, create a .env file in the root of this CLI project and add:
DEV_MODE_DIR=/path/to/your/local/apps-script-engine-template
Replace /path/to/your/local/apps-script-engine-template with the absolute path to your local template repository.
Author
👤 Dmitry Kostyuk
Show Your Support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator