Amazon Alexa Starter in TypeScript
- Uses TypeScript, Yarn, Node, Chai & Mocha, AWS Lambda Mock Context Tutorial from Youtube: Create An Amazon Alexa Skill Using Node.js And AWS Lambda
// How this project was setup
brew install yarn
yarn add alexa-sdk
npm install -g typescript
npm install --save-dev @types/alexa-sdk
||
yarn add @types/alexa-sdk --dev
yarn add chai
yarn add mocha
yarn global add mocha
yarn add aws-lambda-mock-context
tsc --init // creates tsconfig.json file
In tsconfig.json
- add "watch": true,
- uncomment "sourceMap": true,
Mac [Command] + [Shift] + P
> Tasks: Configure Task Runner
In .vscode > tasks.json, add the following object to the tasks array:
{
"taskName": "tsc",
"type": "shell",
"command": "tsc",
"problemMatcher": "$tsc"
}
Test by saving a change in index.ts. You should see index.js and index.js.map files output in the src directory
index.ts - basic typescript class
utterances.txt - list all possible user phrases
Run tests
mocha