GithubHelp home page GithubHelp logo

alexa-skill-typescript-template's Introduction

Amazon AlexaのカスタムスキルをTypeScriptを使って開発するテンプレートです。

AWS Lambdaへのデプロイや、Alexaのスキルで扱うその他のAWSリソースの管理は、AWS SAM (Serverless Application Model)を利用しています。

必要なもの

AWS SAM CLI

デプロイ先のAWSアカウントの認証情報の設定

デプロイ

下記のコマンドでデプロイできます。

$ sh deploy.sh

このデプロイ用のシェルスクリプトで実行している内容は下記の通りです。

  1. TypeScriptで作成したLambda関数を通常のJavaScriptファイルにビルド。
  2. 上記でビルドしたLambda関数をパッケージング。
  3. パッケージングした内容を指定のS3バケットへアップロード・そのURIを参照した serverless-output.yaml を自動生成。
  4. serverless-output.yamlの内容に従って、AWS環境にデプロイ。

注意点

skill/src/ フォルダ内でのパッケージ管理について

型情報を参照するパッケージ(「@types/」から始まるパッケージなど)や、TypeScriptからJavaScriptにビルドした後のファイルで使用しないパッケージは、 $ yarn add -D {packageName}devDependencies としてインストールすることをおすすめします。

(こうすることで、デプロイ時のLambda関数のファイルサイズを軽量に保つことができます。)

alexa-skill-typescript-template's People

Contributors

minamo173 avatar

Stargazers

yukpiz avatar

Watchers

James Cloos avatar  avatar

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.