-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgulpfile.js
43 lines (36 loc) · 1.09 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"use strict";
const gulp = require('gulp')
, nodemon = require('gulp-nodemon')
, debug = require('gulp-debug') // eslint-disable-line no-unused-vars
, rimraf = require('gulp-rimraf')
, UtteranceExpaander = require('alexa-utterance-expander')
, run = require('gulp-run')
, fs = require('fs')
, path = require('path')
;
gulp.task('watch', function (cb) {
nodemon({
script: 'src/www/server.js',
watch: ['www/*','config/*','services/*','skill/*'],
ext: 'json js',
ignore: ['node_modules/**/*']
});
});
gulp.task('clean',function(){
return gulp.src('archives').pipe(rimraf());
})
gulp.task('run', function(cb){
require('./www/server.js');
});
gulp.task('default',['run'], function (cb) {
});
gulp.task('upload',function(){
return run('ask deploy -t lambda').exec()
});
gulp.task('compile', function (cb) {
fs.readFile(path.join(__dirname,'speechAssets','SampleUtterances-src.txt'),function(err,file){
if(err) return cb(err);
var expanded = UtteranceExpaander(file);
fs.writeFile(path.join(__dirname,'speechAssets','SampleUtterances.txt'),expanded,cb);
});
});