[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/ -> Gruntfile.js (source)

   1  /* jshint node:true */
   2  module.exports = function( grunt ) {
   3      var WORKING_DIR = '.';
   4  
   5      require( 'load-grunt-tasks' )( grunt );
   6  
   7      grunt.initConfig( {
   8          uglify: {
   9              options: {
  10                  output: {
  11                      ascii_only: true
  12                  }
  13              },
  14              core: {
  15                  expand: true,
  16                  cwd: WORKING_DIR,
  17                  dest: WORKING_DIR,
  18                  src: [
  19                      'assets/js/**/*.js',
  20  
  21                      // Exceptions.
  22                      '!**/*.min.js'
  23                  ],
  24  
  25                  // Custom rename function to support files with multiple dots.
  26                  rename: function( dst, src ) {
  27                      return src.replace( '.js', '.min.js' );
  28                  }
  29              }
  30          },
  31          cssmin: {
  32              core: {
  33                  expand: true,
  34                  cwd: WORKING_DIR,
  35                  dest: WORKING_DIR,
  36                  src: [
  37                      'assets/css/*.css',
  38  
  39                      // Exceptions.
  40                      '!**/*.min.css'
  41                  ],
  42  
  43                  // Custom rename function to support files with multiple dots.
  44                  rename: function( dst, src ) {
  45                      return src.replace( '.css', '.min.css' );
  46                  }
  47              }
  48          }
  49      } );
  50  
  51      grunt.registerTask( 'default', [ 'uglify', 'cssmin' ] );
  52  };


Generated: Thu Nov 21 01:01:07 2024 Cross-referenced by PHPXref 0.7.1