0.5.1 • Published 4 months ago

@battis/gas-lighter v0.5.1

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

@battis/gas-lighter

npm version Module type: CJS

Caution

This is an idiosyncratic collection of add-ons and helpers for writing TypeScript code to be compiled into Google Apps Script. It is under constant evolution and tweaking. My basic approach has been that, whenever I start to see the same slog of boiler plate repetitivity in my GAS scripts, I try to exile it to this library to a) allow myself to write shorter code and b) ensure that my boilerplate is, in fact, consistent.

Use at your own peril. And make pull requests with your own improvements.

-- Seth

Install

npm i @battis/gas-lighter
npm i -D npm-run-all

If installing with pnpm a postinstall script will "shamefully" hoist dependencies

If working on an existing Google Apps Script project:

npx clasp clone [script ID]

If creating a new project:

npx clasp create [Script Title]

In .claspignore:

**/**
!appsscript.json
!build/*.js
!css/*.html
!js/*.html
!templates/*.html
.git/**
node_modules/**

In .gitignore:

/.clasp.json
/build/

In tsconfig.json:

{
  "extends": "@battis/gas-lighter/tsconfig.json",
  "compilerOptions": {
    "outDir": "build"
  },
  "include": ["src"]
}

In webpack.config.js:

module.exports = require('@battis/gas-lighter/webpack.config')({
  root: __dirname
});

In package.json:

{
  "scripts": {
    "build": "webpack",
    "deploy": "run-s deploy:*",
    "deploy:build": "npm run build",
    "deploy:push": "clasp push"
  },
  "eslintConfig": {
    "extends": "@battis/gas-lighter/.eslintrc.json"
  }
}

Configuration

Configuration options include, with defaults:

{
  root, // absolute path
  build: "build", // path relative to root
  bundle: "main", // string name
  entry: "./src/index.ts" // path relative to webpack.config.js
}
0.5.0

4 months ago

0.5.1

4 months ago

0.4.4

9 months ago

0.4.3

9 months ago

0.4.2

9 months ago

0.4.1

9 months ago

0.4.0

9 months ago

0.3.5

9 months ago

0.3.4

9 months ago

0.3.3

9 months ago

0.3.2

9 months ago

0.3.1

9 months ago

0.3.0

9 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago

0.0.1

10 months ago