diff options
Diffstat (limited to 'js/gulpfile.js')
-rw-r--r-- | js/gulpfile.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/js/gulpfile.js b/js/gulpfile.js index e5109cd97..299918986 100644 --- a/js/gulpfile.js +++ b/js/gulpfile.js @@ -17,7 +17,9 @@ const gulp = require('gulp'), jshint = require('gulp-jshint'), KarmaServer = require('karma').Server, concat = require('gulp-concat'), - sourcemaps = require('gulp-sourcemaps'); + sourcemaps = require('gulp-sourcemaps'), + webpackStream = require('webpack-stream'), + webpackConfig = require('./webpack.config.js'); // Configuration const buildTarget = 'app.min.js'; @@ -30,6 +32,8 @@ const sources = [ 'node_modules/angular-sanitize/angular-sanitize.min.js', 'node_modules/moment/min/moment-with-locales.min.js', 'node_modules/masonry-layout/dist/masonry.pkgd.min.js', + 'node_modules/vue/dist/vue.js', + 'node_modules/ngVue/build/index.js', 'app/App.js', 'app/Config.js', 'app/Run.js', 'controller/**/*.js', 'filter/**/*.js', @@ -40,8 +44,10 @@ const sources = [ 'directive/**/*.js' ]; const testSources = ['tests/**/*.js']; -const watchSources = sources.concat(testSources).concat(['*.js']); -const lintSources = watchSources; +const watchSources = sources.concat(testSources); +const lintSources = watchSources.filter((item) => { + return item !== 'webpack.config.js'; +}); // tasks gulp.task('lint', () => { @@ -51,8 +57,12 @@ gulp.task('lint', () => { .pipe(jshint.reporter('fail')); }); -gulp.task('default', gulp.series('lint', () => { - return gulp.src(sources) +gulp.task('webpack', () => { + return webpackStream(webpackConfig) + .pipe(gulp.dest('./webpacked')); +}); +gulp.task('default', gulp.series('lint', 'webpack', () => { + return gulp.src(sources.concat(['webpacked/webpacked_vue_components.js'])) .pipe(ngAnnotate()) .pipe(sourcemaps.init()) .pipe(concat(buildTarget)) |