-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
46 lines (37 loc) · 1.17 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
44
45
46
const gulp = require('gulp');
const scp = require('gulp-scp2');
const webpack = require('gulp-webpack');
const runSequence = require('run-sequence');
const del = require('del');
//THE BELOW SEQUENCE IS USED TO CLEAN, BUILD AND DEPLOY
// THE PROJECT TO THE SERVER. NOT NEEDED FOR LOCAL DEVELOPMENT
// NOT NEEDED FOR HEROKU DEPLOYS
// gulp.task('build', function(callback) {
// runSequence('build-copy',
// 'build-deploy',
// callback);
// });
gulp.task('build-clean', function() {
return del([
'dist/**'
]).then(paths => {
console.log('Deleted files and folders:\n', paths.join('\n'));
});
});
// NOT USED FOR HEROKU DEPLOYS
// gulp.task('build-copy', function(){
// return gulp.src(['./scripts/pm2-prod.json','./package.json', './index.html', './app.js', './server.js'])
// .pipe(gulp.dest('./dist/'))
// });
// gulp.task('build-deploy', function() {
// return gulp.src('./dist/**')
// .pipe(scp({
// host:'ec2-52-15-196-180.us-east-2.compute.amazonaws.com',
// username: 'bgaynor',
// password: 'swe!RagefA4h',
// dest: '/home/bgaynor'
// }))
// .on('error', function(err) {
// console.log(err);
// });
// });