@@ -11,16 +11,14 @@ import buffer from 'vinyl-buffer';
1111import { dirs } from './config.js' ;
1212import { customSass } from './compilers.js' ;
1313
14- gulp . task ( 'build:test' , ( ) => {
15- return gulp . src ( [
16- path . resolve ( dirs . test , '**/*.test.js' ) ,
17- path . resolve ( dirs . test , 'config.js' ) ,
18- ] )
14+ gulp . task ( 'build:test' , ( ) => gulp . src ( [
15+ path . resolve ( dirs . test , '**/*.test.js' ) ,
16+ path . resolve ( dirs . test , 'config.js' ) ,
17+ ] )
1918 . pipe ( sourcemaps . init ( ) )
2019 . pipe ( babel ( ) )
2120 . pipe ( sourcemaps . write ( ) )
22- . pipe ( gulp . dest ( dirs . buildTest ) ) ;
23- } ) ;
21+ . pipe ( gulp . dest ( dirs . buildTest ) ) ) ;
2422
2523gulp . task ( 'build:client' , [ 'copy:client' ] , ( ) => {
2624 vueify . compiler . applyConfig ( {
@@ -34,7 +32,7 @@ gulp.task('build:client', ['copy:client'], () => {
3432 } ,
3533 } ) ;
3634
37- let b = browserify ( {
35+ const b = browserify ( {
3836 entries : path . resolve ( dirs . srcClient , 'main.js' ) ,
3937 debug : true ,
4038 } ) ;
@@ -49,43 +47,38 @@ gulp.task('build:client', ['copy:client'], () => {
4947 'bundle.css'
5048 ) ,
5149 global : true ,
52- generateScopedName : function ( name , filename ) {
53- var matches = filename . match ( / ^ \/ n o d e _ m o d u l e s / ) ;
50+ generateScopedName ( name , filename ) {
51+ const matches = filename . match ( / ^ \/ n o d e _ m o d u l e s / ) ;
5452 if ( matches ) return name ;
5553 if ( process . env . NODE_ENV === 'production' ) {
5654 return modulesify . generateShortName ( name , filename ) ;
57- } else {
58- return modulesify . generateLongName ( name , filename ) ;
5955 }
56+ return modulesify . generateLongName ( name , filename ) ;
6057 } ,
6158 } ) ;
6259
6360 return b . bundle ( )
64- . pipe ( source ( 'bundle.js' ) )
65- . pipe ( buffer ( ) )
66- . pipe ( sourcemaps . init ( { loadMaps : true } ) )
67- . pipe ( sourcemaps . write ( '.' ) )
68- . pipe ( gulp . dest ( dirs . buildClient ) ) ;
61+ . pipe ( source ( 'bundle.js' ) )
62+ . pipe ( buffer ( ) )
63+ . pipe ( sourcemaps . init ( { loadMaps : true } ) )
64+ . pipe ( sourcemaps . write ( '.' ) )
65+ . pipe ( gulp . dest ( dirs . buildClient ) ) ;
6966} ) ;
7067
71- gulp . task ( 'build:common' , ( ) => {
72- return gulp . src ( path . resolve ( dirs . srcCommon , '**/*.js' ) )
68+ gulp . task ( 'build:common' , ( ) => gulp . src ( path . resolve ( dirs . srcCommon , '**/*.js' ) )
7369 . pipe ( sourcemaps . init ( ) )
7470 . pipe ( babel ( ) )
7571 . pipe ( sourcemaps . write ( '.' ) )
76- . pipe ( gulp . dest ( dirs . buildCommon ) ) ;
77- } ) ;
72+ . pipe ( gulp . dest ( dirs . buildCommon ) ) ) ;
7873
79- gulp . task ( 'build:server' , [ 'copy:server' ] , ( ) => {
80- return gulp . src ( [
81- path . resolve ( dirs . srcServer , '**/*.js' ) ,
82- path . resolve ( dirs . root , 'index.js' ) ,
83- ] )
74+ gulp . task ( 'build:server' , [ 'copy:server' ] , ( ) => gulp . src ( [
75+ path . resolve ( dirs . srcServer , '**/*.js' ) ,
76+ path . resolve ( dirs . root , 'index.js' ) ,
77+ ] )
8478 . pipe ( sourcemaps . init ( ) )
8579 . pipe ( babel ( ) )
8680 . pipe ( sourcemaps . write ( '.' ) )
87- . pipe ( gulp . dest ( dirs . buildServer ) ) ;
88- } ) ;
81+ . pipe ( gulp . dest ( dirs . buildServer ) ) ) ;
8982
9083gulp . task ( 'build' , [
9184 'build:test' ,
0 commit comments