Code Monkey home page Code Monkey logo

tech's Introduction

👋 Hi there

✨ Skills

My Skills

🏃‍♀️ Activities

Top Langs github stats

📱 Web Apps

tech's People

Contributors

egamasa avatar

Watchers

 avatar

tech's Issues

Google Apps Script 開発環境構築

Google Apps Script 開発環境構築

Node.js & npm インストール

  • Node.js インストーラ

  • Node.js と同時に npm もインストールされる

    > node -v
    v12.18.0
    
    > npm -v
    6.14.4
    

clasp インストール

  • インストール

    > npm install -g @google/clasp
    
    C:\Users\hoge\AppData\Roaming\npm\clasp ->  C:\Users\hoge\AppData\Roaming\npm\node_modules\@google\clasp\src\index.js
    npm WARN [email protected] requires a peer of inquirer@^5.0.0 || ^6.0.0 but none   is installed. You must install peer dependencies yourself.
    
    + @google/[email protected]
    added 160 packages from 92 contributors in 14.381s
    
    > clasp -v
    2.3.0
    
  • 依存関係のあるパッケージがインストールされる

    > npm list
    
    C:\Users\hoge\AppData\Roaming\npm
    `-- @google/[email protected]
      +-- [email protected] extraneous
        ・・・
      +-- [email protected] extraneous
      +-- UNMET PEER DEPENDENCY [email protected] extraneous
      +-- [email protected] extraneous
        ・・・
      `-- [email protected] extraneous
    
      npm ERR! peer dep missing: inquirer@^5.0.0 || ^6.0.0, required by [email protected]
        ・・・
    
  • WARN (UNMET PEER DEPENDENCY) が出たので、[email protected] を追加

    > npm install [email protected]
    
    npm notice created a lockfile as package-lock.json. You should commit this file.
    + [email protected]
    removed 9 packages, updated 12 packages, moved 1 package and audited 151 packages in 2.061s
    
    5 packages are looking for funding
    run `npm fund` for details
    
    found 0 vulnerabilities
    

Google Apps Script 連携

  • Google Apps Script API 有効化

  • アカウント連携

    > clasp login
    

    ブラウザ起動後、Googleアカウントへログイン&APIアクセス許可する

    【ブラウザ】
    Logged in! You may close this page.
    
    【CLI】
    Logging in globally...
    Authorize clasp by visiting this url:
    https://accounts.google.com/o/oauth2/v2/auth?・・・
    
    Authorization successful.
    
    Default credentials saved to: ~\.clasprc.json (C:\Users\hoge\.clasprc.json).
    

GASプロジェクトのクローン・フェッチ

  • Webエディタ > ファイル > プロジェクトのプロパティ > 情報 から スクリプトID を確認しておく
> clasp clone [スクリプトID]
> clasp pull

GASプロジェクトのプッシュ

  • .clasp.json が存在するディレクトリで実行する
> clasp push
  • アップロード可能なファイル
    • *.gs
    • *.html
    • appscript.json
  • アップロードしないファイル
    • .claspignore ファイルに記述

参考

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.