@@ -294,29 +294,29 @@ function reduxStyles() {
294294 { allowEmpty : true }
295295 )
296296
297- . pipe ( sassPackager ( { } ) )
298- . pipe ( concat ( 'redux-fields.min.scss' ) )
299- . pipe (
300- sass (
301- {
302- errLogToConsole : true ,
303- outputStyle : 'compressed' ,
304- // outputStyle: 'compact',
305- // outputStyle: 'nested',
306- // outputStyle: 'expanded'.
307- precision : 10
308- }
309- )
297+ . pipe ( sassPackager ( { } ) )
298+ . pipe ( concat ( 'redux-fields.min.scss' ) )
299+ . pipe (
300+ sass (
301+ {
302+ errLogToConsole : true ,
303+ outputStyle : 'compressed' ,
304+ // outputStyle: 'compact',
305+ // outputStyle: 'nested',
306+ // outputStyle: 'expanded'.
307+ precision : 10
308+ }
310309 )
311- . on ( 'error' , console . error . bind ( console ) )
312- . pipe ( sourcemaps . write ( { includeContent : false } ) )
313- . pipe ( sourcemaps . init ( { loadMaps : true } ) )
314- . pipe ( autoprefixer ( AUTOPREFIXER_BROWSERS ) )
315- . pipe ( sourcemaps . write ( './' ) )
316- . pipe ( lineec ( ) ) // Consistent Line Endings for non UNIX systems.
317- . pipe ( gulp . dest ( 'redux-core/assets/css/' ) ) ;
318-
319- return merge ( core , colors , fields , extensions , extension_fields , redux_files ) ;
310+ )
311+ . on ( 'error' , console . error . bind ( console ) )
312+ . pipe ( sourcemaps . write ( { includeContent : false } ) )
313+ . pipe ( sourcemaps . init ( { loadMaps : true } ) )
314+ . pipe ( autoprefixer ( AUTOPREFIXER_BROWSERS ) )
315+ . pipe ( sourcemaps . write ( './' ) )
316+ . pipe ( lineec ( ) ) // Consistent Line Endings for non UNIX systems.
317+ . pipe ( gulp . dest ( 'redux-core/assets/css/' ) ) ;
318+
319+ return merge ( core , colors , fields , extensions , extension_fields , redux_files ) ;
320320}
321321
322322function extFieldJS ( done ) {
@@ -597,19 +597,18 @@ function vendorsJS( done ) {
597597 * again, do it with the command `gulp images`.
598598 */
599599function reduxImages ( done ) {
600-
601600 gulp . src ( imagesSRC )
602- . pipe (
603- imagemin (
604- {
605- progressive : true ,
606- optimizationLevel : 3 , // 0-7 low-high
607- interlaced : true ,
608- svgoPlugins : [ { removeViewBox : false } ]
609- }
601+ . pipe (
602+ imagemin (
603+ {
604+ progressive : true ,
605+ optimizationLevel : 3 , // 0-7 low-high
606+ interlaced : true ,
607+ svgoPlugins : [ { removeViewBox : false } ]
608+ }
609+ )
610610 )
611- )
612- . pipe ( gulp . dest ( imagesDestination ) ) ;
611+ . pipe ( gulp . dest ( imagesDestination ) ) ;
613612
614613 done ( ) ;
615614}
@@ -625,20 +624,20 @@ function reduxImages( done ) {
625624 */
626625function translate ( ) {
627626 return gulp . src ( projectPHPWatchFiles )
628- . pipe ( sort ( ) )
629- . pipe (
630- wpPot (
631- {
632- domain : text_domain ,
633- destFile : destFile ,
634- package : packageName ,
635- bugReport : bugReport ,
636- lastTranslator : lastTranslator ,
637- team : team
638- }
627+ . pipe ( sort ( ) )
628+ . pipe (
629+ wpPot (
630+ {
631+ domain : text_domain ,
632+ destFile : destFile ,
633+ package : packageName ,
634+ bugReport : bugReport ,
635+ lastTranslator : lastTranslator ,
636+ team : team
637+ }
638+ )
639639 )
640- )
641- . pipe ( gulp . dest ( translatePath + '/' + destFile ) ) ;
640+ . pipe ( gulp . dest ( translatePath + '/' + destFile ) ) ;
642641}
643642
644643function installFontawesome ( done ) {
@@ -679,94 +678,6 @@ gulp.task( 'images', reduxImages );
679678gulp . task ( 'translate' , translate ) ;
680679gulp . task ( 'composer' , installFontawesome ) ;
681680
682- function cleanBuild ( ) {
683- return gulp . src ( './build' , { read : false , allowEmpty : true } )
684- . pipe ( clean ( ) ) ;
685- }
686-
687- function makeBuild ( ) {
688- return gulp . src ( [
689- './**/*.*' ,
690- '!./assets/js/*.dev.*' ,
691- '!./node_modules/**/*.*' ,
692- '!./src/**/*.*' ,
693- '!./.wordpress-org/**/*.*' ,
694- '!./.github/**/*.*' ,
695- '!./build/**/*.zip' ,
696- '!./gulpfile.js' ,
697- '!./yarn.lock' ,
698- '!./yarn-error.log' ,
699- '!.babelrc' ,
700- '!./languages/**/*' ,
701- '!.eslintrc' ,
702- '!./package-lock.json' ,
703- '!./composer-lock.json' ,
704- '!./composer.lock' ,
705- '!./webpack.*.js' ,
706- '!./jest.config.js' ,
707- '!./**/jest.config.js' ,
708- '!./**/babel.config.js' ,
709- '!./package.json' ,
710- '!./composer.json' ,
711- '!./ruleset.xml' ,
712- '!./codestyles/*' ,
713- '!./local_developer.txt' ,
714- '!./jsconfig.json' ,
715- '!./vendor/**/*' ,
716- '!./tests/**/*' ,
717- '!./redux-core/assets/scss/**/*' ,
718- '!./redux-core/assets/img/raw/**/*' ,
719- '!./redux-templates/src/**/*' ,
720- '!./redux-templates/classes/*.json' ,
721- ] ) . pipe ( gulp . dest ( 'build/' ) ) ;
722- }
723-
724- function admin_css ( ) {
725- return gulp . src ( [ './redux-templates/src/scss/*.scss' ] )
726- . pipe ( sass ( ) )
727- . pipe ( autoprefixer ( {
728- cascade : false
729- } ) )
730- . pipe ( minifyCSS ( ) )
731- . pipe ( concat ( 'admin.min.css' ) )
732- . pipe ( gulp . dest ( 'redux-templates/assets/css/' ) ) ;
733- }
734-
735-
736- function minify_js ( ) {
737- return gulp . src ( [ './build/redux-templates/assets/js/*.js' ] )
738- . pipe ( minifyJS ( {
739- ext : {
740- src : '.js' ,
741- min : '.min.js'
742- } ,
743- exclude : [ 'tasks' ] ,
744- ignoreFiles : [ 'redux-templates.min.js' , '*-min.js' , '*.min.js' ]
745- } ) )
746- . pipe ( gulp . dest ( [ './build/redux-templates/assets/js/' ] ) ) ;
747-
748- }
749-
750-
751- function makeZip ( ) {
752- return gulp . src ( './build/**/*.*' )
753- . pipe ( zip ( './build/redux.zip' ) )
754- . pipe ( gulp . dest ( './' ) ) ;
755- }
756-
757- gulp . task ( 'makeBuild' , makeBuild ) ;
758- gulp . task ( 'admin_css' , admin_css ) ;
759- gulp . task ( 'minify_js' , minify_js ) ;
760- gulp . task ( 'cleanBuild' , cleanBuild ) ;
761- gulp . task ( 'makeZip' , makeZip ) ;
762-
763- gulp . task ( 'templates' , gulp . series (
764- 'cleanBuild' ,
765- 'makeBuild' ,
766- 'admin_css' ,
767- 'minify_js' ,
768- 'makeZip'
769- ) ) ;
770681/**
771682 * Watch Tasks.
772683 *
0 commit comments