Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zaki-yama/webpack-google-apps-script-template
Template for developing Google Apps Script with Webpack
https://github.com/zaki-yama/webpack-google-apps-script-template
google-apps-script webpack
Last synced: 4 months ago
JSON representation
Template for developing Google Apps Script with Webpack
- Host: GitHub
- URL: https://github.com/zaki-yama/webpack-google-apps-script-template
- Owner: zaki-yama
- Archived: true
- Created: 2017-04-23T17:44:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-01T11:15:56.000Z (about 7 years ago)
- Last Synced: 2024-01-16T12:16:23.207Z (6 months ago)
- Topics: google-apps-script, webpack
- Language: JavaScript
- Size: 44.9 KB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Lists
- google-apps-script-awesome-list - zaki-yama/webpack-google-apps-script-template
- google-apps-script-awesome-list - zaki-yama/webpack-google-apps-script-template
- google-apps-script-awesome-list_contributorpw - zaki-yama/webpack-google-apps-script-template
README
Google Apps Script Template
===========================## Installation
```zsh
$ npm install
# or yarn
```## Authentication
If you've never installed `gapps` and authenticate it, please read [here](https://github.com/danthareja/node-google-apps-script#quickstart) and download your credentials, then run
```zsh
$ npm run auth -- [path/to/credentials.json]
```(For Japanese, see [GoogleAppsScriptローカル開発用の公式CLI(node-google-apps-script)がついに登場したので試してみる - Qiita](http://qiita.com/zaki-yama/items/9a301542137febd8876c))
## Usage
```zsh
# Open your GAS(Google Apps Script) file and get fileId.
# (fileId is like https://script.google.com/d/[fileId]/edit)
# Pass it to `init` command.
$ npm run init -- [fileId]# Bundle scripts under lib/ directory and generate src/bundle.js.
$ npm run build# Upload src/bundle.js to GAS.
$ npm run upload# Run ESLint
$ npm run lint# Watch mode: watches file updates under `lib/` directory, re-build and upload automatically.
$ npm run watch
```## Load environment variables
If you use environment variables (such as `process.env.FOO`), Create `.env` and define them as `KEY=VALUE` format.