Skip to content

Commit 9ef09ed

Browse files
committed
Build: Remove the build task and it's dependencies. Will bring back testing against minified files later.
1 parent 041e0ec commit 9ef09ed

File tree

4 files changed

+4
-86
lines changed

4 files changed

+4
-86
lines changed

Gruntfile.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,6 @@ var
6767
}
6868
},
6969

70-
minifyCSS = {
71-
options: {
72-
keepSpecialComments: 0
73-
},
74-
main: {
75-
options: {
76-
keepSpecialComments: "*"
77-
},
78-
src: "dist/jquery-ui.css",
79-
dest: "dist/jquery-ui.min.css"
80-
}
81-
},
82-
8370
compareFiles = {
8471
all: [
8572
"dist/jquery-ui.js",
@@ -107,16 +94,6 @@ uiFiles.concat( allI18nFiles ).forEach(function( file ) {
10794
minify[ file ].files[ mapMinFile( file ) ] = file;
10895
});
10996

110-
cssFiles.forEach(function( file ) {
111-
minifyCSS[ file ] = {
112-
options: {
113-
banner: createBanner()
114-
},
115-
src: file,
116-
dest: "dist/" + file.replace( /\.css$/, ".min.css" ).replace( /themes\/base\//, "themes/base/minified/" )
117-
};
118-
});
119-
12097
uiFiles.forEach(function( file ) {
12198
// TODO this doesn't do anything until https://github.com/rwldrn/grunt-compare-size/issues/13
12299
compareFiles[ file ] = [ file, mapMinFile( file ) ];
@@ -128,7 +105,6 @@ grunt.loadNpmTasks( "grunt-contrib-uglify" );
128105
grunt.loadNpmTasks( "grunt-contrib-concat" );
129106
grunt.loadNpmTasks( "grunt-contrib-qunit" );
130107
grunt.loadNpmTasks( "grunt-contrib-csslint" );
131-
grunt.loadNpmTasks( "grunt-contrib-cssmin" );
132108
grunt.loadNpmTasks( "grunt-html" );
133109
grunt.loadNpmTasks( "grunt-compare-size" );
134110
grunt.loadNpmTasks( "grunt-git-authors" );
@@ -186,20 +162,12 @@ grunt.initConfig({
186162
}
187163
},
188164
uglify: minify,
189-
cssmin: minifyCSS,
190165
htmllint: {
191166
// ignore files that contain invalid html, used only for ajax content testing
192167
all: grunt.file.expand( [ "demos/**/*.html", "tests/**/*.html" ] ).filter(function( file ) {
193168
return !/(?:ajax\/content\d\.html|tabs\/data\/test\.html|tests\/unit\/core\/core.*\.html)/.test( file );
194169
})
195170
},
196-
copy: {
197-
dist_units_images: {
198-
src: "themes/base/images/*",
199-
strip: /^themes\/base\//,
200-
dest: "dist/"
201-
}
202-
},
203171
qunit: {
204172
files: expandFiles( "tests/unit/**/*.html" ).filter(function( file ) {
205173
// disabling everything that doesn't (quite) work with PhantomJS for now
@@ -249,7 +217,4 @@ grunt.registerTask( "test", [ "qunit" ] );
249217
grunt.registerTask( "sizer", [ "concat:ui", "uglify:main", "compare_size:all" ] );
250218
grunt.registerTask( "sizer_all", [ "concat:ui", "uglify", "compare_size" ] );
251219

252-
// "copy:dist_units_images" is used by unit tests
253-
grunt.registerTask( "build", [ "concat", "uglify", "cssmin", "copy:dist_units_images" ] );
254-
255220
};

build/tasks/build.js

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@ module.exports = function( grunt ) {
22

33
"use strict";
44

5-
var fs = require( "fs" );
6-
7-
function expandFiles( files ) {
8-
return grunt.util._.pluck( grunt.file.expandMapping( files ), "src" ).filter(function(filepath) {
9-
// restrict to files, exclude folders
10-
try {
11-
return fs.statSync( filepath[ 0 ] ).isFile();
12-
} catch(e) {
13-
throw grunt.task.taskError(e.message, e);
14-
}
15-
}).map(function( values ) {
16-
return values[ 0 ];
17-
});
18-
}
19-
205
grunt.registerTask( "manifest", "Generate jquery.json manifest files", function() {
216
var pkg = grunt.config( "pkg" ),
227
base = {
@@ -96,41 +81,6 @@ grunt.registerTask( "manifest", "Generate jquery.json manifest files", function(
9681
});
9782
});
9883

99-
grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @VERSION with pkg.version", function() {
100-
function replaceVersion( source ) {
101-
return source.replace( /@VERSION/g, grunt.config( "pkg.version" ) );
102-
}
103-
function copyFile( src, dest ) {
104-
if ( /(js|css)$/.test( src ) ) {
105-
grunt.file.copy( src, dest, {
106-
process: replaceVersion
107-
});
108-
} else {
109-
grunt.file.copy( src, dest );
110-
}
111-
}
112-
var files = expandFiles( this.filesSrc ),
113-
target = this.data.dest + "/",
114-
strip = this.data.strip,
115-
renameCount = 0,
116-
fileName;
117-
if ( typeof strip === "string" ) {
118-
strip = new RegExp( "^" + grunt.template.process( strip, grunt.config() ).replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ) );
119-
}
120-
files.forEach(function( fileName ) {
121-
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
122-
copyFile( fileName, target + targetFile );
123-
});
124-
grunt.log.writeln( "Copied " + files.length + " files." );
125-
for ( fileName in this.data.renames ) {
126-
renameCount += 1;
127-
copyFile( fileName, target + grunt.template.process( this.data.renames[ fileName ], grunt.config() ) );
128-
}
129-
if ( renameCount ) {
130-
grunt.log.writeln( "Renamed " + renameCount + " files." );
131-
}
132-
});
133-
13484
grunt.registerTask( "clean", function() {
13585
require( "rimraf" ).sync( "dist" );
13686
});

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"grunt-contrib-concat": "0.1.3",
6363
"grunt-contrib-qunit": "0.2.0",
6464
"grunt-contrib-csslint": "0.1.1",
65-
"grunt-contrib-cssmin": "0.4.2",
6665
"grunt-compare-size": "0.4.0-rc.3",
6766
"grunt-html": "0.3.3",
6867
"grunt-git-authors": "1.2.0",

tests/unit/testsuite.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ QUnit.reset = function() {
2727

2828
QUnit.config.requireExpects = true;
2929

30+
/*
31+
// TODO: Add back the ability to test against minified files
32+
// see QUnit.urlParams.min usage below
3033
QUnit.config.urlConfig.push({
3134
id: "min",
3235
label: "Minified source",
3336
tooltip: "Load minified source files instead of the regular unminified ones."
3437
});
38+
*/
3539

3640
TestHelpers.loadResources = QUnit.urlParams.min ?
3741
function() {

0 commit comments

Comments
 (0)