Matteo Scandolo | fc4b37b | 2017-02-02 12:18:47 -0800 | [diff] [blame] | 1 | const path = require('path'); |
| 2 | |
| 3 | const gulp = require('gulp'); |
| 4 | const del = require('del'); |
| 5 | const filter = require('gulp-filter'); |
| 6 | const rename = require('gulp-rename'); |
| 7 | const replace = require('gulp-replace'); |
| 8 | |
| 9 | const conf = require('../conf/gulp.conf'); |
| 10 | |
| 11 | gulp.task('clean', clean); |
| 12 | gulp.task('other', other); |
| 13 | |
| 14 | function clean() { |
Matteo Scandolo | a120cfd | 2017-02-06 16:03:36 -0800 | [diff] [blame] | 15 | return del([`${conf.paths.dist}/*`, conf.paths.tmp]); |
Matteo Scandolo | fc4b37b | 2017-02-02 12:18:47 -0800 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | function other() { |
| 19 | const fileFilter = filter(file => file.stat.isFile()); |
| 20 | |
| 21 | return gulp.src([ |
| 22 | path.join(conf.paths.src, '/**/*'), |
| 23 | path.join(`!${conf.paths.src}`, '/**/*.{scss,ts,html}') |
| 24 | ]) |
| 25 | .pipe(fileFilter) |
| 26 | .pipe(gulp.dest(conf.paths.dist)); |
| 27 | } |
| 28 | |
| 29 | function other() { |
| 30 | const fileFilter = filter(file => file.stat.isFile()); |
| 31 | |
| 32 | return gulp.src([ |
| 33 | path.join(conf.paths.src, '/**/*'), |
| 34 | path.join(`!${conf.paths.src}`, '/**/*.{scss,ts,html}') |
| 35 | ]) |
| 36 | .pipe(fileFilter) |
| 37 | .pipe(gulp.dest(conf.paths.dist)); |
| 38 | } |