Changeset 25960
- Timestamp:
- 10/27/2013 09:53:11 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r25693 r25960 1 /* global module:false*/1 /* jshint node:true */ 2 2 module.exports = function(grunt) { 3 var path = require('path') ;4 var SOURCE_DIR = 'src/';5 varBUILD_DIR = 'build/';3 var path = require('path'), 4 SOURCE_DIR = 'src/', 5 BUILD_DIR = 'build/'; 6 6 7 7 // Load tasks. … … 48 48 version: { 49 49 options: { 50 processContent: function( src , filepath) {51 return src.replace( /^(\$wp_version.+?)-src';/m, "$1';");50 processContent: function( src ) { 51 return src.replace( /^(\$wp_version.+?)-src';/m, '$1\';' ); 52 52 } 53 53 }, … … 79 79 '!wp-admin/css/farbtastic.css' 80 80 ] 81 } 82 }, 83 jshint: { 84 options: grunt.file.readJSON('.jshintrc'), 85 grunt: { 86 files: { 87 src: ['Gruntfile.js'] 88 }, 89 options: { 90 onevar: true 91 } 92 }, 93 tests: { 94 files: { 95 src: [ 96 'tests/qunit/**/*.js', 97 '!tests/qunit/vendor/qunit.js' 98 ] 99 }, 100 options: grunt.file.readJSON('tests/qunit/.jshintrc') 101 }, 102 'wp-admin': { 103 files: { 104 src: [ 105 'src/wp-admin/js/**/*.js', 106 '!src/wp-admin/js/farbtastic.js', 107 '!src/wp-admin/js/iris.min.js' 108 ] 109 } 110 }, 111 'wp-includes': { 112 files: { 113 src: [ 114 'src/wp-includes/js/**/*.js', 115 // 3rd-Party Scripts 116 '!src/wp-includes/js/backbone.min.js', 117 '!src/wp-includes/js/colorpicker.js', 118 '!src/wp-includes/js/crop/**/*.js', 119 '!src/wp-includes/js/hoverIntent.js', 120 '!src/wp-includes/js/imgareaselect/**/*.js', 121 '!src/wp-includes/js/jcrop/**/*.js', 122 '!src/wp-includes/js/jquery/**/*.js', 123 '!src/wp-includes/js/json2.js', 124 '!src/wp-includes/js/mediaelement/**/*.js', 125 '!src/wp-includes/js/plupload/**/*.js', 126 '!src/wp-includes/js/swfobject.js', 127 '!src/wp-includes/js/swfupload/**/*.js', 128 '!src/wp-includes/js/thickbox/**/*.js', 129 '!src/wp-includes/js/tinymce/**/*.js', 130 '!src/wp-includes/js/tw-sack.js', 131 '!src/wp-includes/js/underscore.min.js', 132 '!src/wp-includes/js/zxcvbn.min.js' 133 ] 134 } 81 135 } 82 136 }, … … 195 249 // configurations so that only the changed files are updated. 196 250 grunt.event.on('watch', function( action, filepath, target ) { 197 if ( target != 'all' )251 if ( target !== 'all' ) { 198 252 return; 199 200 var relativePath = path.relative( SOURCE_DIR, filepath ); 201 var cleanSrc = ( action == 'deleted' ) ? [relativePath] : []; 202 var copySrc = ( action == 'deleted' ) ? [] : [relativePath]; 253 } 254 255 var relativePath = path.relative( SOURCE_DIR, filepath ), 256 cleanSrc = ( action === 'deleted' ) ? [relativePath] : [], 257 copySrc = ( action === 'deleted' ) ? [] : [relativePath]; 203 258 204 259 grunt.config(['clean', 'dynamic', 'src'], cleanSrc); -
trunk/package.json
r25243 r25960 19 19 "grunt-contrib-compress": "~0.5.2", 20 20 "grunt-contrib-concat": "~0.3.0", 21 "grunt-contrib-jshint": "~0.7.0", 21 22 "matchdep": "~0.1.2" 22 23 }
Note: See TracChangeset
for help on using the changeset viewer.