Fix build until next grunt rc, disable compare_size.

This commit is contained in:
Dave Methvin 2013-01-26 13:38:04 -05:00
parent a3055f3df6
commit 74aa3eb79c
2 changed files with 47 additions and 45 deletions

View File

@ -22,13 +22,14 @@ module.exports = function( grunt ) {
files: distpaths
},
selector: {
"src/selector.js": [
"src/sizzle-jquery.js",
"src/sizzle/sizzle.js"
]
destFile: "src/selector.js",
apiFile: "src/sizzle-jquery.js",
srcFile: "src/sizzle/sizzle.js"
},
build: {
"dist/jquery.js": [
all:{
dest: "dist/jquery.js",
src: [
"src/intro.js",
"src/core.js",
"src/callbacks.js",
@ -56,6 +57,7 @@ module.exports = function( grunt ) {
"src/exports.js",
"src/outro.js"
]
}
},
jshint: {
@ -143,13 +145,13 @@ module.exports = function( grunt ) {
});
// Build src/selector.js
grunt.registerMultiTask( "selector", "Build src/selector.js", function() {
grunt.registerTask( "selector", "Build src/selector.js", function() {
var name = this.file.dest,
files = this.file.src,
var cfg = grunt.config("selector"),
name = cfg.destFile,
sizzle = {
api: grunt.file.read( files[0] ),
src: grunt.file.read( files[1] )
api: grunt.file.read( cfg.apiFile ),
src: grunt.file.read( cfg.srcFile )
},
compiled, parts;
@ -241,13 +243,14 @@ module.exports = function( grunt ) {
"build",
"Concatenate source (include/exclude modules with +/- flags), embed date/version",
function() {
// Concat specified files.
var compiled = "",
modules = this.flags,
optIn = !modules["*"],
explicit = optIn || Object.keys(modules).length > 1,
name = this.file.dest,
src = this.file.srcRaw,
name = this.data.dest,
src = this.data.src,
deps = {},
excluded = {},
version = grunt.config( "pkg.version" ),
@ -479,7 +482,7 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks("grunt-contrib-uglify");
// Default grunt
grunt.registerTask( "default", [ "update_submodules", "selector", "build:*:*", "jshint", "uglify", "dist:*", "compare_size" ] );
grunt.registerTask( "default", [ "update_submodules", "selector", "build:*:*", "jshint", "uglify", "dist:*" ] );
// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "selector", "build:*:*", "jshint" ] );

View File

@ -29,10 +29,9 @@
"grunt-compare-size": "~0.3.0",
"grunt-git-authors": "~1.1.0",
"grunt-update-submodules": "~0.2.0",
"grunt-contrib-watch": "~0.1.0",
"grunt-contrib-jshint": "~0.1.0",
"grunt-contrib-uglify": "~0.1.0",
"grunt-cli": "~0.1.0",
"grunt-contrib-watch": "~0.1.1",
"grunt-contrib-jshint": "~0.1.1",
"grunt-contrib-uglify": "~0.1.1",
"grunt": "~0.4.0",
"testswarm": "0.2.2"
},