This repository was archived by the owner on Sep 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,28 +41,28 @@ function js() {
4141 const babel = require ( "gulp-babel" ) ;
4242 const uglify = require ( "gulp-uglify" ) ;
4343
44- return pipeline (
45- gulp . src ( JS_DIR , OPTS ) ,
46- webpack ( {
47- mode,
48- devtool : "source-map" ,
49- output : {
50- filename : "script.js"
51- }
52- } ) ,
53- prodOnly ( sourcemaps . init ( { loadMaps : true } ) ) ,
54- prodOnly ( through . obj ( function ( file , enc , cb ) {
44+ return gulp . src ( JS_DIR , OPTS )
45+ . pipe (
46+ webpack ( {
47+ mode,
48+ devtool : "source-map" ,
49+ output : {
50+ filename : "script.js" ,
51+ } ,
52+ } )
53+ )
54+ . pipe ( prodOnly ( sourcemaps . init ( { loadMaps : true } ) )
55+ . pipe ( prodOnly ( through . obj ( function ( file , enc , cb ) {
5556 // Filter out the sourcemaps since gulp-sourcemaps handles them
5657 if ( ! file . path . endsWith ( ".map" ) ) this . push ( file ) ;
5758 cb ( ) ;
58- } ) ) ,
59- prodOnly ( babel ( {
59+ } ) ) ) )
60+ . pipe ( prodOnly ( babel ( {
6061 presets : [ "@babel/env" ]
61- } ) ) ,
62- prodOnly ( uglify ( ) ) ,
63- prodOnly ( sourcemaps . write ( "." ) ) ,
64- gulp . dest ( DEST )
65- ) ;
62+ } ) ) )
63+ . pipe ( prodOnly ( uglify ( ) ) )
64+ . pipe ( prodOnly ( sourcemaps . write ( "." ) ) )
65+ . pipe ( gulp . dest ( DEST ) ) ;
6666}
6767
6868function css ( ) {
You can’t perform that action at this time.
0 commit comments