Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -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 | |
| 7 | const conf = require('../conf/gulp.conf'); |
| 8 | |
| 9 | gulp.task('clean', clean); |
| 10 | gulp.task('other', other); |
| 11 | |
| 12 | function clean() { |
| 13 | return del([conf.paths.dist, conf.paths.tmp]); |
| 14 | } |
| 15 | |
| 16 | function other() { |
| 17 | const fileFilter = filter(file => file.stat.isFile()); |
| 18 | |
| 19 | return gulp.src([ |
| 20 | path.join(conf.paths.src, '/**/*'), |
| 21 | path.join(`!${conf.paths.src}`, '/**/*.{scss,ts,html}') |
| 22 | ]) |
| 23 | .pipe(fileFilter) |
| 24 | .pipe(gulp.dest(conf.paths.dist)); |
| 25 | } |