Changeset 5614
- Timestamp:
- 02/05/2015 03:07:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r5483 r5614 1 1 /* jshint node:true */ 2 /* global module */ 2 3 module.exports = function( grunt ) { 3 4 var path = require( 'path' ), 4 SOURCE_DIR = 'src/',5 BUILD_DIR = 'build/',6 7 BBP_RTL_CSS = [8 'includes/admin/css/admin-rtl.css',9 'includes/admin/styles/*/colors-rtl.css',10 'templates/default/css/bbpress-rtl.css'11 ],12 13 BBP_LTR_CSS = [14 'includes/admin/css/admin.css',15 'includes/admin/styles/*/colors.css',16 'templates/default/css/bbpress.css'17 ],18 19 BBP_JS = [20 'includes/admin/js/*.js',21 'templates/default/js/*.js'22 ],23 24 BBP_EXCLUDED_FILES = [25 // Ignore these26 '!**/.{svn,git}/**',27 '!.editorconfig',28 '!.gitignore',29 '!.jshintrc',30 '!.travis.yml',31 '!build/**',32 '!Gruntfile.js',33 '!node_modules/**',34 '!npm-debug.log',35 '!package.json',36 37 // bbPress SCSS CSS source files38 '!**/*.scss',39 40 // bbPress PHPUnit tests41 '!tests/**',42 '!phpunit.xml',43 '!phpunit.xml.dist'44 ];5 SOURCE_DIR = 'src/', 6 BUILD_DIR = 'build/', 7 8 BBP_RTL_CSS = [ 9 'includes/admin/css/admin-rtl.css', 10 'includes/admin/styles/*/colors-rtl.css', 11 'templates/default/css/bbpress-rtl.css' 12 ], 13 14 BBP_LTR_CSS = [ 15 'includes/admin/css/admin.css', 16 'includes/admin/styles/*/colors.css', 17 'templates/default/css/bbpress.css' 18 ], 19 20 BBP_JS = [ 21 'includes/admin/js/*.js', 22 'templates/default/js/*.js' 23 ], 24 25 BBP_EXCLUDED_FILES = [ 26 // Ignore these 27 '!**/.{svn,git}/**', 28 '!.editorconfig', 29 '!.gitignore', 30 '!.jshintrc', 31 '!.travis.yml', 32 '!build/**', 33 '!Gruntfile.js', 34 '!node_modules/**', 35 '!npm-debug.log', 36 '!package.json', 37 38 // bbPress SCSS CSS source files 39 '!**/*.scss', 40 41 // bbPress PHPUnit tests 42 '!tests/**', 43 '!phpunit.xml', 44 '!phpunit.xml.dist' 45 ]; 45 46 46 47 // Load tasks. 47 48 require( 'matchdep' ).filterDev([ 'grunt-*', '!grunt-legacy-util' ]).forEach( grunt.loadNpmTasks ); 49 48 50 // Load legacy utils 49 grunt.util = require( 'grunt-legacy-util');51 grunt.util = require( 'grunt-legacy-util' ); 50 52 51 53 // Project configuration. … … 317 319 318 320 // Color schemes task. 319 grunt.registerTask( 'colors', ['sass:colors']);321 grunt.registerTask( 'colors', ['sass:colors'] ); 320 322 321 323 // Build tasks. 322 grunt.registerTask( 'build', [ 'clean:all', 'copy:files', 'colors', 'cssjanus:core', 'cssmin:ltr', 'cssmin:rtl', 'uglify:core', 'jsvalidate:build', 'makepot' ] ); 323 grunt.registerTask( 'build-release', [ 'clean:all', 'copy:files', 'colors', 'cssjanus:core', 'cssmin:ltr', 'cssmin:rtl', 'uglify:core', 'jsvalidate:build', 'checktextdomain', 'makepot', 'phpunit' ] ); 324 grunt.registerTask( 'src', ['jsvalidate', 'jshint', 'cssjanus'] ); 325 grunt.registerTask( 'commit', ['src', 'checktextdomain'] ); 326 grunt.registerTask( 'build', [ 'clean:all', 'copy:files', 'colors', 'cssjanus:core', 'cssmin:ltr', 'cssmin:rtl', 'uglify:core', 'jsvalidate:build', 'makepot' ] ); 327 grunt.registerTask( 'release', [ 'build', 'checktextdomain' ] ); 324 328 325 329 // PHPUnit test task. … … 332 336 } ); 333 337 338 // PHPUnit test task. 339 grunt.registerTask( 'test', 'Run all PHPUnit test tasks.', ['phpunit'] ); 340 334 341 // JavaScript test task. 335 grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate', 'jshint' ] );336 337 // Travis CI task.338 grunt.registerTask( 'travis', ['js hint', 'phpunit'] );342 grunt.registerTask( 'jstest', 'Runs all JavaScript tasks.', [ 'jsvalidate', 'jshint' ] ); 343 344 // Travis CI Task 345 grunt.registerTask( 'travis', ['jsvalidate', 'jshint', 'checktextdomain', 'test'] ); 339 346 340 347 // Patch task. 341 grunt.renameTask( 'patch_wordpress', 'patch');348 grunt.renameTask( 'patch_wordpress', 'patch' ); 342 349 343 350 // Default task. 344 grunt.registerTask( 'default', [ 'build'] );351 grunt.registerTask( 'default', ['src'] ); 345 352 346 353 // Add a listener to the watch task.
Note: See TracChangeset
for help on using the changeset viewer.