-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
36 lines (33 loc) · 883 Bytes
/
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
var gulp = require('gulp'),
util = require('gulp-util'),
vftp = require('vinyl-ftp'),
svgs = require('gulp-svgstore')
smin = require('gulp-svgmin'),
path = require('path');
// https://github.com/w0rm/gulp-svgstore#usage
gulp.task('default', function() {
return gulp.src('public/svg/*.svg').pipe(smin(function(file) {
var prefix = path.basename(file.relative, path.extname(file.relative));
return {
plugins: [{
cleanupIDs: {
prefix: prefix + '-',
minify: true
}
}]
}
})).pipe(svgs()).pipe(gulp.dest('public/svg'));
});
gulp.task('deploy', function() {
var conn = vftp.create({
host: 'paulmakesthe.net',
user: 'username',
pass: 'password',
parallel: 8,
log: util.log
}),
globs = 'www/**';
return gulp.src(globs, { buffer: false })
.pipe(conn.newer('/public_html/watchlist'))
.pipe(conn.dest('/public_html/watchlist'));
});