Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cameronhunter/generator-alexa-skill
A Yeoman generator for scaffolding an ES2015 Alexa Skill for AWS Lambda
https://github.com/cameronhunter/generator-alexa-skill
Last synced: about 2 months ago
JSON representation
A Yeoman generator for scaffolding an ES2015 Alexa Skill for AWS Lambda
- Host: GitHub
- URL: https://github.com/cameronhunter/generator-alexa-skill
- Owner: cameronhunter
- License: mit
- Archived: true
- Created: 2015-09-25T01:19:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-21T21:23:00.000Z (over 7 years ago)
- Last Synced: 2024-11-11T22:14:52.291Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://cameronhunter.github.io/alexa-playground
- Size: 78.1 KB
- Stars: 22
- Watchers: 4
- Forks: 9
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# generator-alexa-skill
[![Build Status](https://travis-ci.org/cameronhunter/generator-alexa-skill.svg?branch=master)](https://travis-ci.org/cameronhunter/generator-alexa-skill) [![NPM Version](https://img.shields.io/npm/v/generator-alexa-skill.svg)](https://npmjs.org/package/generator-alexa-skill) [![License](https://img.shields.io/npm/l/generator-alexa-skill.svg)](https://github.com/cameronhunter/generator-alexa-skill/blob/master/LICENSE)
A [Yeoman](http://yeoman.io) generator for scaffolding an Alexa Skill for AWS Lambda using [alexa-lambda-skill](https://github.com/cameronhunter/alexa-lambda-skill).
## Installation
```bash
npm install -g yo generator-alexa-skill
```## Generating a new Alexa Skill
```bash
yo alexa-skill
```This creates a brand new Alexa Skill, add your logic into `src/index.js` and tests into `test/index-test.js`. The template is a HelloWorld skill:
```javascript
import Response from 'alexa-response';
import { Skill, Launch, Intent } from 'alexa-annotations';@Skill
export default class HelloWorld {@Launch
launch() {
return Response.say('HelloWorld launched!');
}@Intent('hello')
hello({ name = 'world' }) {
return Response.say(`Hello ${name}`).card({ title: 'HelloWorld', content: `Hello ${name}` });
}@Intent('AMAZON.HelpIntent')
help() {
return Response.ask('I say hello to people. Who should I say hello to?').reprompt('Who should I say hello to?');
}@Intent('AMAZON.CancelIntent', 'AMAZON.StopIntent')
stop() {
return Response.say('Goodbye');
}}
```Also see `model/UTTERANCES` for phrases that users may say to interact with this skill and the schema of user intents in `model/schema.json` that are used to build the interaction model for your skill.