GULP FILE:
const gulp = require('gulp');
const sass = require('gulp-sass');
const plumber = require('gulp-plumber');
const sourcemaps = require('gulp-sourcemaps');
const rename = require("gulp-rename");
const babel = require("rollup-plugin-babel");
const rollup = require('gulp-rollup');
const typescript = require('rollup-plugin-typescript2');

gulp.task('styles', function() {
gulp.src('src/scss/style.scss')
.pipe(sass().on('error', sass.logError))
.pipe(rename({
basename: 'main'
}))
.pipe(gulp.dest('./dist/css/'));
});

gulp.task('scripts', function () {
gulp.src('./src/app/**/*.ts')
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(rollup({
input: 'src/app/main.ts',
format: 'umd',
plugins: [
typescript({tsconfig: 'src/app/tsconfig.json'}),
babel({
presets: [
[
"es2015",
{
modules: false
}
]
],
plugins: [
"external-helpers"
]
})
]
}))
.pipe(rename({
basename: 'main',
extname: '.js'
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dist/js/'));
});

gulp.task('watch', function () {
gulp.watch('src/app/**/*.ts', ['scripts']);
gulp.watch('src/scss/**/*.scss', ['styles']);
});