Skip to content
Open
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
10 changes: 6 additions & 4 deletions templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ var htmlminOpts = {
removeRedundantAttributes: true
};

var LIVE_RELOAD_PORT = 35729;

/**
* JS Hint
*/
Expand Down Expand Up @@ -99,7 +101,7 @@ gulp.task('vendors', function () {
var files = bowerFiles();
var vendorJs = fileTypeFilter(files, 'js');
var vendorCss = fileTypeFilter(files, 'css');
var q = new queue({objectMode: true});
var q = queue({objectMode: true});
if (vendorJs.length) {
q.queue(gulp.src(vendorJs).pipe(dist('js', 'vendors')));
}
Expand All @@ -121,7 +123,7 @@ function index () {
.pipe(g.inject(gulp.src(bowerFiles(), opt), {ignorePath: 'bower_components', starttag: '<!-- inject:vendor:{{ext}} -->'}))
.pipe(g.inject(es.merge(appFiles(), cssFiles(opt)), {ignorePath: ['.tmp', 'src/app']}))
.pipe(gulp.dest('./src/app/'))
.pipe(g.embedlr())
.pipe(g.embedlr({port: LIVE_RELOAD_PORT}))
.pipe(gulp.dest('./.tmp/'))
.pipe(livereload());
}
Expand Down Expand Up @@ -160,7 +162,7 @@ gulp.task('serve', ['watch']);
gulp.task('watch', ['statics', 'default'], function () {
isWatching = true;
// Initiate livereload server:
g.livereload.listen();<% if (coffee) { %>
g.livereload.listen(LIVE_RELOAD_PORT);<% if (coffee) { %>
gulp.watch('./src/app/**/*.coffee', ['coffee']);<% } %>
gulp.watch('./<% if (coffee) { %>.tmp/<% } %>src/app/**/*.js', ['jshint']).on('change', function (evt) {
if (evt.type !== 'changed') {
Expand Down Expand Up @@ -222,7 +224,7 @@ gulp.task('karma-conf', ['templates'], function () {
* Test files
*/
function testFiles() {
return new queue({objectMode: true})
return queue({objectMode: true})

Choose a reason for hiding this comment

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

did you intend to remove the new queue? How does it help?

Copy link
Author

Choose a reason for hiding this comment

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

It's just to remove the warning in Gulp 3.9.1

"A constructor name should start with an uppercase letter"

.queue(gulp.src(fileTypeFilter(bowerFiles(), 'js')))
.queue(gulp.src('./bower_components/angular-mocks/angular-mocks.js'))
.queue(appFiles())
Expand Down
2 changes: 1 addition & 1 deletion templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lazypipe": "~0.2.1",
"gulp-cached": "^1.0.1",
"gulp-embedlr": "~0.5.2",
"gulp-livereload": "^2.1.0",
"gulp-livereload": "^3.0.0",
"gulp-header": "^1.0.2",
"gulp-inject": "^1.0.1",
"gulp-serve": "~0.2.0",
Expand Down