Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"gulp-coffee": "~2.3.1",
"gulp-coffeelint": "~0.5.0",
<% } if (props.jsPreprocessor.srcExtension === 'es6') { -%>
"gulp-webpack": "~1.5.0",
"webpack-stream": "~2.0.0",
"jshint-loader": "~0.8.3",
<% } if (props.jsPreprocessor.key === 'babel') { -%>
"babel-core": "~5.5.8",
Expand Down
9 changes: 5 additions & 4 deletions app/templates/gulp/_scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var gulp = require('gulp');
var conf = require('./conf');

var browserSync = require('browser-sync');
var webpack = require('webpack-stream');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Swiip ... I forgot to add the condition on this require :-(

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arf :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


var $ = require('gulp-load-plugins')();

Expand Down Expand Up @@ -42,7 +43,7 @@ gulp.task('scripts', function () {
.pipe($.size())
});
<% } else { -%>
function webpack(watch, callback) {
function webpackWrapper(watch, callback) {
var webpackOptions = {
watch: watch,
module: {
Expand Down Expand Up @@ -78,15 +79,15 @@ function webpack(watch, callback) {
};

return gulp.src(path.join(conf.paths.src, '/app/index.module.js'))
.pipe($.webpack(webpackOptions, null, webpackChangeHandler))
.pipe(webpack(webpackOptions, null, webpackChangeHandler))
.pipe(gulp.dest(path.join(conf.paths.tmp, '/serve/app')));
}

gulp.task('scripts', function () {
return webpack(false);
return webpackWrapper(false);
});

gulp.task('scripts:watch', ['scripts'], function (callback) {
return webpack(true, callback);
return webpackWrapper(true, callback);
});
<% } -%>
Loading