Repository navigation
Expand file tree
/
Copy pathsync.js
More file actions
51 lines (43 loc) · 1.48 KB
/
Copy pathsync.js
File metadata and controls
51 lines (43 loc) · 1.48 KB
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
47
48
49
50
51
// Copy assets
var gulp = require('gulp'),
paths = require('./config/paths'),
plumber = require('gulp-plumber');
// Copy some helpers and devtools.
// Credits to @jbdemonte https://github.com/gulpjs/gulp/issues/151
gulp.task('sync:fonts', function() {
return gulp.src([paths.dev.fonts + '/**/*.{eot,svg,ttf,otf,woff,woff2}'], {base: paths.dev.fonts})
.pipe(plumber())
.pipe(gulp.dest(paths.build.fonts));
});
gulp.task('sync:helpers', function() {
return gulp.src([
paths.dev.helpers + '/**/',
paths.dev.helpers + '/.htaccess'
], {base: paths.dev.helpers})
.pipe(plumber())
.pipe(gulp.dest(paths.build.main));
});
gulp.task('sync:images', function() {
return gulp.src([paths.dev.images + '/**/*.*'], {base: paths.dev.images})
.pipe(plumber())
.pipe(gulp.dest(paths.build.images));
});
// Copy some helpers and devtools within watch task
gulp.task('sync:fonts:changed', function() {
return gulp.src([paths.dev.fonts + '/**/*.{eot,svg,ttf,otf,woff,woff2}'], {base: paths.dev.fonts})
.pipe(plumber())
.pipe(gulp.dest(paths.build.fonts));
});
gulp.task('sync:helpers:changed', function() {
gulp.src([
paths.dev.helpers + '/**/',
paths.dev.helpers + '/.htaccess'
], {base: paths.dev.helpers})
.pipe(plumber())
.pipe(gulp.dest(paths.build.main));
});
gulp.task('sync:images:changed', function() {
return gulp.src([paths.dev.images + '/**/*.*'], {base: paths.dev.images})
.pipe(plumber())
.pipe(gulp.dest(paths.build.images));
});