import * as gulp from 'gulp';
import * as replace from 'gulp-replace';
import * as sass from 'gulp-sass';



gulp.task('copyHtml', () => {
    gulp.src(['./src/**/*.html'])
        .pipe(gulp.dest('./dist/src'));

});

gulp.task('copyTs', () => {
    gulp.src(['./src/**/*.ts'])
        .pipe(replace(/styleUrls: \[(\'\.\/|\')(.*?)\.scss\'\]/g, 'styleUrls: [\'$2.css\']'))
        .pipe(gulp.dest('./dist/src'));

});


gulp.task('copyScss', () => {
    gulp.src(['./src/**/*.scss'])
        .pipe(sass())
        .pipe(gulp.dest('./dist/src'));
});



gulp.task('default', ['copyHtml', 'copyTs', 'copyScss']);

