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'); |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 6 | const rename = require('gulp-rename'); |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 7 | const replace = require('gulp-replace'); |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 8 | |
| 9 | const conf = require('../conf/gulp.conf'); |
| 10 | |
| 11 | gulp.task('clean', clean); |
| 12 | gulp.task('other', other); |
| 13 | |
| 14 | function clean() { |
| 15 | return del([conf.paths.dist, conf.paths.tmp]); |
| 16 | } |
| 17 | |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 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 | |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 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 | } |