Voxa Framework Snippets
Code snippets to speed up your Alexa skill development using the Voxa Framework
Details
Installs
- Total 66
- Win 40
- Mac 13
- Linux 13
Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Voxa Framework Snippets
This extension provides you code snippets for Sublime Text to speed up your Alexa skills development using the Voxa Framework made by RAIN.
Installation
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.
Snippets
Every space inside { }
means that this is pushed into next line.
$
represent each step after tab
.
State and Intent
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 } |
Boilerplate code for files
viewsVoxa
const views = (function views() {
return {
$1
};
}());
askVoxa
$1:ResponseName: {
ask: '$2',
reprompt: '$3',
},
tellVoxa
$1:ResponseName: {
tell: '$2',
},
sayVoxa
$1:ResponseName: {
say: '$2',
},
variablesVoxa
module.exports = {
$1:variableName: model => model.$1:variableName,
},
registerVoxa
exports.register = function register(skill) {
$1
};
mainstatemachineVoxa
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;
serverVoxa
const skill = require('${1:./skill/MainStateMachine}');
const config = require('${2:./config}');
skill.startServer(config.server.port);
lambdaVoxa
const skill = require('${1:./skill/MainStateMachine}');
exports.handler = skill.lambda();