Giter Site home page Giter Site logo

clomie / gas-vue-typescript Goto Github PK

View Code? Open in Web Editor NEW
47.0 4.0 11.0 2.21 MB

Template for Google Apps Script macros and its front-end webapp setup with TypeScript, Vue.js, Vuetify.

JavaScript 27.28% HTML 4.67% TypeScript 35.19% Vue 32.86%
vue typescript javascript apps-script templates

gas-vue-typescript's Introduction

gas-vue-typescript

This is a template repository for Google Apps Script (GAS) WebApp project.
The main use case for this repository is GAS macros and its execution front-end.

The front-end is preconfigured with:

  • TypeScript
  • Vue.js
  • Vuetify
  • Function call from client side
  • Google Picker

Project Tree

/gas-vue-typescript
├─ frontend/  # Front-end (Vue.js) project
├─ script/    # GAS script project
└─ types/     # Type definitions that are used across both projects.

Setup

Install Clasp

% npm -g install @google/clasp
% clasp login

Create GAS Project

% clasp create --type webapp --rootDir dist
Created new webapp script: https://script.google.com/d/*****/edit
Warning: files in subfolder are not accounted for unless you set a '.claspignore' file.
Cloned 1 file.
└─ dist/appsscript.json

Get API Key for Google Picker

See below link and get your API key.
https://developers.google.com/picker/docs/#appreg

Setup your API key as build environment variables.

% echo 'VUE_APP_PICKER_DEVELOPER_KEY=<Your Developer Key...>' > ./frontend/.env.local

Install Dependencies

% yarn

Build Application

% yarn build

Push Built Files to GAS Project

% clasp push
? Manifest file has been updated. Do you want to push and overwrite? Yes
└─ dist/Code.js
└─ dist/appsscript.json
└─ dist/index.html
Pushed 3 files.

Open pushed WebApp

% clasp open --webapp
? Open which deployment?@HEAD - AKfycbaaaaaaa...
Opening web application: AKfycbaaaaaaa...

Release WebApp

If the 1st time:

% clasp version "First release"
~ 1 Version ~
1 - First release
% clasp deploy -V 1
- AKfycbbbbbbbb... @1.

2nd and after:

% clasp version "Another release"
Created version 2.
% clasp deployments
2 Deployments.
- AKfycbaaaaaaa... @HEAD
- AKfycbbbbbbbb... @1
% clasp deploy -V 2 -i AKfycbbbbbbbb...
- AKfycbbbbbbbb... @2.

Customize Configuration

See Configuration Reference.

See Also

gas-vue-typescript's People

Contributors

dependabot[bot] avatar toga4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gas-vue-typescript's Issues

Setup CI

To setup Github Actions. It may contains following stuffs.

  • lint
  • build
  • push
  • deploy

Error when building fresh install: types conflict

Hi @clomie, thanks for a great project!

I'm trying to build a fresh install of it, however, I get the following error: Subsequent variable declarations must have the same type. Variable 'console' must be of type 'Console', but here has type 'console'.

If I understand correctly, it's related to this issue, but I couldn't find a correct way to solve it (commenting out the row that causes this error indeed solves the problem, but it doesn't feel like a right way to do it). Do you have any clues to this?

Thanks :)

Error when building fresh install

Executing make build fails with the following error:

ERROR in /Users/mateus-wmf/workspace/thesocialdev/mymoney/frontend/node_modules/@types/node/ts3.1/globals.d.ts(573,15):
573:15 Interface 'NodeJS.Module' incorrectly extends interface '__WebpackModuleApi.Module'.
  Types of property 'parent' are incompatible.
    Type 'Module | null | undefined' is not assignable to type 'NodeModule | null'.
      Type 'undefined' is not assignable to type 'NodeModule | null'.
    571 |         '.node': (m: Module, filename: string) => any;
    572 |     }
  > 573 |     interface Module {
        |               ^
    574 |         exports: any;
    575 |         require: Require;
    576 |         id: string;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.