Skip to:
Content

bbPress.org

Changeset 5344


Ignore:
Timestamp:
05/05/2014 11:09:14 AM (10 years ago)
Author:
netweb
Message:

More Grunt updates

  • Adds uglify:dynamic to grunt uglify so that grunt watch -> watch:js tasks can dynamicly minify Javascript files with the grunt watch task.
  • Improved inline documentation for grunt jshint task.
  • Props netweb. See #2542
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r5342 r5344  
    154154                /**
    155155                 * Limit JSHint's run to a single specified file: grunt jshint:core --file=filename.js
     156                 * Optionally, include the file path: grunt jshint:core --file=path/to/filename.js
    156157                 *
    157158                 * @param {String} filepath
     
    186187                ext: '.min.js',
    187188                src: BBP_JS
     189            },
     190            dynamic: {
     191                cwd: SOURCE_DIR,
     192                dest: BUILD_DIR,
     193                expand: true,
     194                ext: '.min.js',
     195                src: []
    188196            },
    189197            options: {
     
    290298                    spawn: false
    291299                }
     300            },
     301            js: {
     302                files: BBP_JS.map( function( path ) {
     303                    return SOURCE_DIR + path;
     304                } ),
     305                tasks: [ 'uglify:dynamic' ],
     306                options: {
     307                    interval: 2000,
     308                    spawn: false
     309                }
    292310            }
    293311        }
     
    336354        grunt.config( [ 'copy', 'dynamic', 'src' ], copySrc );
    337355        grunt.config( [ 'cssjanus', 'dynamic', 'src' ], copySrc );
     356        grunt.config( [ 'uglify', 'dynamic', 'src' ], copySrc );
    338357    });
    339358};
Note: See TracChangeset for help on using the changeset viewer.