Make WordPress Core

Ticket #25169: 25169.2.diff

File 25169.2.diff, 1.3 KB (added by wonderboymusic, 11 years ago)
  • Gruntfile.js

     
    3030                                                src: [
    3131                                                        '**',
    3232                                                        '!**/.{svn,git}/**', // Ignore version control directories.
    33                                                         '!wp-includes/version.php' // Exclude version.php
     33                                                        '!wp-includes/version.php', // Exclude version.php
     34                                                        '!**/*.{png,jpg,gif,jpeg}' // Exclude images.  They are handled by the imagemin task
    3435                                                ],
    3536                                                dest: BUILD_DIR
    3637                                        },
     
    314315                                }
    315316                        }
    316317                },
     318                imagemin: {
     319                        files: {
     320                                expand: true,
     321                                cwd: SOURCE_DIR,
     322                                src: '**/*.{png,jpg,gif,jpeg}',
     323                                dest: BUILD_DIR
     324                        }
     325                },
    317326                watch: {
    318327                        all: {
    319328                                files: [
     
    356365        // Register tasks.
    357366
    358367        // Copy task.
    359         grunt.registerTask('copy:all', ['copy:files', 'copy:version']);
     368        grunt.registerTask('copy:all', ['copy:files', 'copy:version', 'imagemin']);
    360369
    361370        // RTL task.
    362371        grunt.registerTask('rtl', ['cssjanus:core', 'cssjanus:colors']);
  • package.json

     
    2222    "grunt-cssjanus": "~0.2.2",
    2323    "grunt-sass": "~0.10.0",
    2424    "grunt-jsvalidate": "~0.2.2",
     25    "grunt-contrib-imagemin" : "~0.4.1",
    2526    "matchdep": "~0.3.0"
    2627  }
    2728}