Changeset 8954
- Timestamp:
- 08/21/2014 05:22:07 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r8768 r8954 2 2 /* global module */ 3 3 module.exports = function( grunt ) { 4 var path = require( 'path' ), 5 SOURCE_DIR = 'src/', 6 BUILD_DIR = 'build/', 7 8 BP_CSS = [ 9 '**/*.css', 10 '!**/*-rtl.css' // Exclude RTL files 11 ], 12 13 BP_JS = [ 14 '**/*.js', 15 16 // Exclude third-party libraries. 17 '!bp-core/js/jquery.atwho.js', 18 '!bp-core/js/jquery.caret.js', 19 20 // Exclude legacy templates. 21 '!bp-templates/**/*.js', 22 23 // Exclude anything in any deprecated folders. 24 '!**/deprecated/**/*.js' 25 ]; 4 var SOURCE_DIR = 'src/', 5 BUILD_DIR = 'build/', 6 7 // CSS 8 BP_CSS = [ 9 '**/*.css' 10 ], 11 12 // CSS exclusions, for excluding files from certain tasks, e.g. cssjanus 13 BP_EXCLUDED_CSS = [ 14 '!**/*-rtl.css' 15 ], 16 17 // JavaScript - Core 18 BP_JS = [ 19 '**/*.js' 20 ], 21 22 // JavaScript exclusions, for excluding from certain tasks e.g jshint 23 BP_EXCLUDED_JS = [ 24 '!bp-core/deprecated/js/**/*.js', // Depracted 25 '!bp-core/js/jquery.atwho.js', // External 3rd party library 26 '!bp-core/js/jquery.caret.js', // External 3rd party library 27 '!bp-core/js/jquery-cookie.js' // External 3rd party library 28 ]; 26 29 27 30 require( 'matchdep' ).filterDev( ['grunt-*', '!grunt-legacy-util'] ).forEach( grunt.loadNpmTasks ); 28 31 grunt.util = require( 'grunt-legacy-util' ); 29 32 30 31 33 grunt.initConfig( { 32 pkg: grunt.file.readJSON( 'package.json'),34 pkg: grunt.file.readJSON( 'package.json' ), 33 35 jshint: { 34 36 options: grunt.file.readJSON( '.jshintrc' ), … … 39 41 expand: true, 40 42 cwd: SOURCE_DIR, 41 src: BP_JS ,43 src: BP_JS.concat( BP_EXCLUDED_JS ), 42 44 43 45 /** 44 * Limit JSHint's run to a single specified file: grunt jshint:core --file=filename.js 45 * Optionally, include the file path: grunt jshint:core --file=path/to/filename.js 46 * Limit JSHint's run to a single specified file: 47 * 48 * grunt jshint:core --file=filename.js 49 * 50 * Optionally, include the file path: 51 * 52 * grunt jshint:core --file=path/to/filename.js 46 53 * 47 54 * @param {String} filepath … … 74 81 cwd: SOURCE_DIR, 75 82 dest: SOURCE_DIR, 83 extDot: 'last', 76 84 ext: '-rtl.css', 77 src: BP_CSS ,85 src: BP_CSS.concat( BP_EXCLUDED_CSS ), 78 86 options: { generateExactDuplicates: true } 79 }, 80 dynamic: { 81 expand: true, 82 cwd: SOURCE_DIR, 83 dest: SOURCE_DIR, 84 ext: '-rtl.css', 85 src: [], 86 options: { generateExactDuplicates: true } 87 } 88 }, 89 87 } 88 }, 90 89 checktextdomain: { 91 90 options: { … … 139 138 } 140 139 }, 141 142 140 clean: { 143 all: [ BUILD_DIR ], 144 dynamic: { 145 cwd: BUILD_DIR, 146 dot: true, 147 expand: true, 148 src: [] 149 } 141 all: [ BUILD_DIR ] 150 142 }, 151 143 copy: { … … 160 152 } 161 153 ] 162 },163 dynamic: {164 cwd: SOURCE_DIR,165 dest: BUILD_DIR,166 dot: true,167 expand: true,168 src: []169 154 } 170 155 }, … … 173 158 cwd: BUILD_DIR, 174 159 dest: BUILD_DIR, 160 extDot: 'last', 175 161 expand: true, 176 162 ext: '.min.js', … … 184 170 }, 185 171 cssmin: { 186 ltr: {172 minify: { 187 173 cwd: BUILD_DIR, 188 174 dest: BUILD_DIR, 175 extDot: 'last', 189 176 expand: true, 190 177 ext: '.min.css', … … 195 182 'https://wordpress.org/plugins/buddypress/ */' 196 183 } 197 }, 198 rtl: { 199 cwd: BUILD_DIR, 200 dest: BUILD_DIR, 201 expand: true, 202 ext: '.min.css', 203 src: BP_CSS.map( function( filename ) { 204 return filename.replace( '.css', '-rtl.css' ); 205 }), 206 options: { 207 banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + 208 '<%= grunt.template.today("UTC:yyyy-mm-dd h:MM:ss TT Z") %> - ' + 209 'https://wordpress.org/plugins/buddypress/ */' 210 } 211 } 212 }, 213 184 } 185 }, 214 186 phpunit: { 215 187 'default': { … … 234 206 } 235 207 }, 236 237 208 jsvalidate:{ 238 209 options:{ … … 243 214 build: { 244 215 files: { 245 src: [BUILD_DIR + '/**/*.{min.js,js}' ] 246 } 247 } 248 }, 249 216 src: [BUILD_DIR + '/**/*.js' ] 217 } 218 }, 219 src: { 220 files: { 221 src: [SOURCE_DIR + '/**/*.js' ] 222 } 223 } 224 }, 250 225 patch: { 251 226 options: { … … 259 234 * Register tasks. 260 235 */ 261 grunt.registerTask( 'build', ['jsvalidate: build', 'jshint', 'cssjanus:core'] );236 grunt.registerTask( 'build', ['jsvalidate:src', 'jshint', 'cssjanus'] ); 262 237 grunt.registerTask( 'build-commit', ['build', 'checktextdomain', 'imagemin'] ); 263 grunt.registerTask( 'build-release', ['build-commit', 'clean:all', 'copy:files', 'uglify :core', 'cssmin:ltr', 'cssmin:rtl', 'makepot', 'exec:bbpress', 'exec:bpdefault', 'test'] );238 grunt.registerTask( 'build-release', ['build-commit', 'clean:all', 'copy:files', 'uglify', 'jsvalidate:build', 'cssmin', 'makepot', 'exec:bbpress', 'exec:bpdefault', 'test'] ); 264 239 265 240 // Testing tasks. … … 274 249 grunt.registerTask( 'test', 'Run all unit test tasks.', ['phpunit'] ); 275 250 276 grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate ', 'jshint' ] );251 grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate:src', 'jshint' ] ); 277 252 278 253 // Travis CI Task … … 284 259 // Default task. 285 260 grunt.registerTask( 'default', ['build'] ); 286 287 /**288 * Add a listener to the watch task.289 *290 * On `watch:all`, automatically updates the `copy:dynamic` and `clean:dynamic` configurations so that only the changed files are updated.291 * On `watch:rtl`, automatically updates the `cssjanus:dynamic` configuration.292 */293 grunt.event.on( 'watch', function( action, filepath, target ) {294 if ( target !== 'all' && target !== 'rtl' ) {295 return;296 }297 298 var relativePath = path.relative( SOURCE_DIR, filepath ),299 cleanSrc = ( action === 'deleted' ) ? [ relativePath ] : [],300 copySrc = ( action === 'deleted' ) ? [] : [ relativePath ];301 302 grunt.config( ['clean', 'dynamic', 'src'], cleanSrc );303 grunt.config( ['copy', 'dynamic', 'src'], copySrc );304 grunt.config( ['cssjanus', 'dynamic', 'src'], copySrc );305 });306 261 }; -
trunk/src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb-rtl.css
r8953 r8954 79 79 80 80 input#send-to-input { width: 275px; } 81 -
trunk/src/bp-templates/bp-legacy/js/buddypress.js
r8931 r8954 1 /* jshint undef: false, unused:false */ 1 2 // AJAX Functions 2 3 var jq = jQuery; … … 422 423 'page': oldest_page, 423 424 'exclude_just_posted': just_posted.join(',') 424 } 425 }; 425 426 426 427 load_more_search = bp_get_querystring('s'); -
trunk/src/bp-templates/bp-legacy/js/password-verify.js
r8686 r8954 1 /* jshint undef: false */ 1 2 /* Password Verify */ 2 3 ( function( $ ){
Note: See TracChangeset
for help on using the changeset viewer.