This extension provides you code snippets for Sublime Text to speed up your Alexa skills development using the Voxa Framework made by RAIN.
The simple way to install these snippets is via Package Control. Search for "Voxa Framework Snippets". If you want to install it manually I will asume that you know what you need to do.
Every space inside { } means that this is pushed into next line.
$ represent each step after tab.
| Prefix | Method |
|---|---|
onintentVoxa→ |
$1:skill.onIntent('$2', ($3:alexaEvent) => { $4 }); |
launchintentVoxa→ |
$1:skill.onIntent('LaunchIntent', ($2:alexaEvent) => { $3 }); |
helpintentVoxa→ |
$1:skill.onIntent('AMAZON.HelpIntent', ($2:alexaEvent) => { $3 }); |
repeatintentVoxa→ |
$1:skill.onIntent('AMAZON.RepeatIntent', ($2:alexaEvent) => { $3 }); |
startoverintentVoxa→ |
$1:skill.onIntent('AMAZON.StartOverIntent', ($2:alexaEvent) => { $3 }); |
onstateVoxa→ |
$1:skill.onState('$2', ($3:alexaEvent) => { $4 }); |
entryVoxa→ |
$1:skill.onState('entry', { $2 }); |
replyVoxa→ |
return { reply: '$1', to: '$2' }; |
toVoxa→ |
return { to: '$1' }; |
ifyesVoxa→ |
if (alexaEvent.intent.name === 'AMAZON.YesIntent') { $1 } |
ifnoVoxa→ |
if (alexaEvent.intent.name === 'AMAZON.NoIntent') { $1 } |
ifintentnameVoxa→ |
if (alexaEvent.intent.name === '$1') { $2 } |
const views = (function views() {
return {
$1
};
}());$1:ResponseName: {
ask: '$2',
reprompt: '$3',
},$1:ResponseName: {
tell: '$2',
},$1:ResponseName: {
say: '$2',
},module.exports = {
$1:variableName: model => model.$1:variableName,
},exports.register = function register(skill) {
$1
};const Voxa = require('voxa');
const views = require('${1:./views}');
const variables = require('${2:./variables}');
const states = require('${3:./states}');
const skill = new Voxa({ variables, views });
states.register(skill);
module.exports = skill;const skill = require('${1:./skill/MainStateMachine}');
const config = require('${2:./config}');
skill.startServer(config.server.port);const skill = require('${1:./skill/MainStateMachine}');
exports.handler = skill.lambda();