0.4.4 • Published 4 months ago

gasup v0.4.4

Weekly downloads
-
License
-
Repository
github
Last release
4 months ago

Gasup

Gasup is a command-line interface (CLI) tool designed to simplify the process.

  • building
  • bundling
  • pushing
  • deploying
  • change development, staging, production

It offers an easy way to automate tasks and manage your deployments without the need to manually interact with the Apps Script dashboard.

Installation

To get started with gasup, you need clasp first.

Then you can install gasup like below.

npm i -D gasup

Usage

Build

Simple build.

gasup --build

This command compiles your code with tsc.

Bundle

Bundle with esbuild into one file.

gasup --bundle

This allows you to use libraries that are not natively available in Google Apps Script.

Push

Simply push using "clasp push".

gasup --push

Deploy

Deploy to the latest deployment. If no previous deployments exist, a new deployment will be created.

gasup --deploy

appsscript.json affects deployment. Be sure to check your appsscript.json.

If you want to deploy webapp, appsscript is like below.

{
  "webapp": {
    "executeAs": "USER_DEPLOYING",
    "access": "ANYONE_ANONYMOUS"
  }
}

Change Environment

If you need to switch between different environments (e.g., development, staging, production), you can use the --env flag to modify the appsscript.json file accordingly.

gasup --env <envpath>

Environment file details:

GASUP_SCRIPT_ID=xxx
GASUP_PARENT_ID=yyy,zzz

Chain

Chan command is available like below.

gasup --env .env.production --bundle --push --deploy

Config

The config file will below.

// gasup.config.ts
import { Config } from 'gasup';

const config:Config = {
  srcDir: './src';
}

export default config;
export interface Config {
  appsScriptJsonPath?: string;
  bundleEntries?: string[];
  bundleOutfile?: string;
  srcDir?: string;
  distDir?: string;
}

License

MIT

0.4.4

4 months ago

0.4.3

4 months ago

0.3.0

5 months ago

0.2.1

5 months ago

0.2.0

5 months ago

0.3.5

5 months ago

0.4.1

5 months ago

0.3.2

5 months ago

0.4.0

5 months ago

0.3.1

5 months ago

0.3.4

5 months ago

0.4.2

5 months ago

0.3.3

5 months ago

0.1.0

5 months ago

0.0.1

5 months ago