Skip to content

Commit 7362262

Browse files
committed
fix(gulp): Fix lodash import and missing braces
1 parent 69c88fa commit 7362262

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

app/templates/gulpfile.babel.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
22
'use strict';
33

4-
import _ from '_';
4+
import _ from 'lodash';
55
import gulp from 'gulp';
66
import path from 'path';
77
import gulpLoadPlugins from 'gulp-load-plugins';
@@ -140,7 +140,7 @@ gulp.task('start:server', () => {
140140
});
141141

142142
gulp.task('watch', () => {
143-
var testFiles = paths.client.test.concat(paths.server.test);
143+
var testFiles = _.union(paths.client.test, paths.server.test);
144144

145145
plugins.watch(paths.client.styles)
146146
.pipe(plugins.plumber())
@@ -158,21 +158,21 @@ gulp.task('watch', () => {
158158
.pipe(gulp.dest('.tmp/scripts'))<% } %>
159159
.pipe(plugins.livereload());
160160

161-
plugins.watch(paths.server.scripts.concat(testFiles))
161+
plugins.watch(_.union(paths.server.scripts, testFiles))
162162
.pipe(plugins.plumber())
163163
.pipe(lintScripts());
164164

165165
gulp.watch('bower.json', ['bower']);
166166
});
167167

168-
gulp.task('serve', (callback) =>
168+
gulp.task('serve', (callback) => {
169169
runSequence('clean:tmp',
170170
['lint:scripts'],
171171
'bower',
172172
['start:server', 'start:client'],
173173
'watch',
174174
callback);
175-
);
175+
});
176176

177177
gulp.task('test:server', () => {
178178
process.env.NODE_ENV = 'test';
@@ -181,7 +181,7 @@ gulp.task('test:server', () => {
181181
});
182182

183183
gulp.task('test:client', () => {
184-
var testFiles = paths.client.testRequire.concat(paths.client.test)
184+
var testFiles = _.union(paths.client.testRequire, paths.client.test)
185185
return gulp.src(testFiles)
186186
.pipe(plugins.karma({
187187
configFile: paths.karma,
@@ -190,23 +190,23 @@ gulp.task('test:client', () => {
190190
});
191191

192192
// inject bower components
193-
gulp.task('bower', () =>
193+
gulp.task('bower', () => {
194194
gulp.src(paths.views.main)
195195
.pipe(wiredep({
196196
exclude: [/bootstrap-sass-official/, /bootstrap.js/, '/json3/', '/es5-shim/', /bootstrap.css/, /font-awesome.css/ ]
197197
}))
198198
.pipe(gulp.dest('client/'));
199-
);
199+
});
200200

201201
///////////
202202
// Build //
203203
///////////
204204

205-
gulp.task('build', (callback) =>
205+
gulp.task('build', (callback) => {
206206
runSequence('clean:dist',
207207
['images', 'copy:extras', 'copy:fonts', 'copy:server', 'client:build'],
208208
callback);
209-
);
209+
});
210210

211211
gulp.task('clean:dist', () => gulp.src('dist', {read: false}).pipe(plugins.clean()));
212212

@@ -233,36 +233,36 @@ gulp.task('client:build', ['html'], () => {
233233
.pipe(gulp.dest(paths.dist + '/public'));
234234
});
235235

236-
gulp.task('html', () =>
236+
gulp.task('html', () => {
237237
gulp.src(yeoman.app + '/views/**/*')
238238
.pipe(gulp.dest(paths.dist + '/public/views'));
239-
);
239+
});
240240

241-
gulp.task('images', () =>
241+
gulp.task('images', () => {
242242
gulp.src(yeoman.app + '/images/**/*')
243243
.pipe(plugins.cache(plugins.imagemin({
244244
optimizationLevel: 5,
245245
progressive: true,
246246
interlaced: true
247247
})))
248248
.pipe(gulp.dest(paths.dist + '/public/images'));
249-
);
249+
});
250250

251-
gulp.task('copy:extras', () =>
251+
gulp.task('copy:extras', () => {
252252
gulp.src(yeoman.app + '/*.*', { dot: true })
253253
.pipe(gulp.dest(paths.dist + '/public'));
254-
);
254+
});
255255

256-
gulp.task('copy:fonts', () =>
256+
gulp.task('copy:fonts', () => {
257257
gulp.src(yeoman.app + '/fonts/**/*')
258258
.pipe(gulp.dest(paths.dist + '/fonts'));
259-
);
259+
});
260260

261-
gulp.task('copy:server', () =>
261+
gulp.task('copy:server', () => {
262262
gulp.src([
263263
'package.json',
264264
'server.js',
265265
'lib/**/*'
266266
], {cwdbase: true})
267267
.pipe(gulp.dest(paths.dist));
268-
);
268+
});

0 commit comments

Comments
 (0)