Compiles short-hand notation for alexa utterances into exhaustive utterances needed by Alexa
npm install alexa-utterance-expander``bash`
npm install alexa-utterance-expander
javascript
const UtteranceExpander = require('alexa-utterance-expander');
`Define place holders
`javascript
console.log(UtteranceExpander([play] play
[play] start
LaunchIntent [play] a [game]));`
generates
`javascript`
LaunchIntent play a game
LaunchIntent play a match
LaunchIntent play a round
LaunchIntent start a game
LaunchIntent start a match
LaunchIntent start a round
Some built-in placeholders
* PLEASE
* YES
* NO
* NEXT
* REPEAT
* STOP
* CANCEL
* STARTOVER
* HELP
#From Gulp#
`javascript
gulp.task('compile', function (cb) {
fs.readFile(path.join(__dirname,'interaction-model','utterances-src.txt'),function(err,file){
if(err) return cb(err);
var expanded = UtteranceExpaander(file);
fs.writeFile(path.join(__dirname,'interaction-model','utterances.txt'),expanded,cb);
});
});
``