delete old js files
This commit is contained in:
parent
f44a9baa8d
commit
929424a3ce
2 changed files with 9 additions and 7 deletions
|
@ -5,11 +5,12 @@ import WebpackDevServer from 'webpack-dev-server';
|
|||
import karma from 'karma';
|
||||
import ip from 'ip';
|
||||
import webpackConfig from './webpack.config';
|
||||
import del from 'del';
|
||||
|
||||
let paths = {
|
||||
build: path.join(__dirname, 'target/build')
|
||||
};
|
||||
|
||||
gulp.task('clean:distjs', function () {
|
||||
return del(['dist/*.js']);
|
||||
});
|
||||
|
||||
/**
|
||||
* Gulp-Task: Fuehrt webpack aus und startet den Development-Server
|
||||
|
@ -53,16 +54,16 @@ gulp.task('webpack-prod', [], (done) => {
|
|||
});
|
||||
|
||||
|
||||
gulp.task('build', ['test-phantomjs', 'webpack-prod'], (done) => {
|
||||
gulp.task('build', ['test-phantomjs', 'clean:distjs', 'webpack-prod'], (done) => {
|
||||
return gulp
|
||||
.src(path.join('target', 'build', '*'))
|
||||
.pipe(gulp.dest('dist'))();
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
gulp.task('build-skipTests', ['webpack-prod'], (done) => {
|
||||
gulp.task('build-skipTests', ['clean:distjs', 'webpack-prod'], (done) => {
|
||||
return gulp
|
||||
.src(path.join('target', 'build', '*'))
|
||||
.pipe(gulp.dest('dist'))();
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"browser-sync": "^2.10.0",
|
||||
"browser-sync-webpack-plugin": "^1.0.0",
|
||||
"css-loader": "^0.23.1",
|
||||
"del": "^2.2.1",
|
||||
"file-loader": "^0.9.0",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-esdoc": "^0.2.0",
|
||||
|
|
Loading…
Reference in a new issue