-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Build: Migrate to grunt 0.4. #867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Btw. to test just install |
jshintrc: ".jshintrc" | ||
}, | ||
files: { | ||
src: [ "grunt.js", "build/**/*.js" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gruntfile.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
One other note, while you're in |
return "<strip_all_banners:" + file + ">"; | ||
}); | ||
} | ||
|
||
function stripDirectory( file ) { | ||
// TODO: we're receiving the directive, so we need to strip the trailing > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, removed.
Thanks for doing this @jzaefferer ! Also, there was 1 thing that @Krinkle had to modify in Jenkins after we pushed core's upgrade to 0.4. I forgot what it was, but obviously coordinate that with him. |
Last thing to note was, when you add |
What I changed in Jenkins is to use |
Actually: [..] executables will be added to the Testing with
So inside the |
Why is that the case? Why do we not want grunt-cli in there globally right now? I really don't think we should be putting grunt-cli in our dependencies. |
One thing I've been waiting for is the name change from lint -> jshint. Now that we've got it, I'd like to add a new |
I'll try to test this out this week. Still knee-deep in site work right now. |
Regarding the lint task: Let's make that the default? Or just add it as an extra task? Order should probably be js, css, html. |
I'm fine with making it the default (I'd still like a named task for it though), unless someone strongly objects to removing tests from the default task. |
I like running the tests in the default task personally. But I'd be just as fine removing it. |
Can we land this and then make the minor improvements later? I'm anxious to see this working. |
@mikesherov I don't want to land this until I've had time to do a dry run of the release process. That should happen early next week (I'm currently knee-deep in site work). |
no problem. I've got an itchy trigger finger. |
Just tested and updated this with rc6 and a rebase against master, no changes required for the new rc, just one merge conflict to resolve (in the generate_themes task). |
@@ -18,11 +18,11 @@ var | |||
|
|||
uiFiles = coreFiles.map(function( file ) { | |||
return "ui/" + file; | |||
}).concat( grunt.file.expandFiles( "ui/*.js" ).filter(function( file ) { | |||
}).concat( expandFiles( "ui/*.js" ).filter(function( file ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's with this? Does grunt.file.expandFiles
no longer exist? What does it not (or no longer) do that grunt.file.expandMapping
(called from expandFiles
) does do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expandFiles
is gone and expandMappings
returns a map of src -> dest, not an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crap, you're right. It was removed...
I've updated to 0.4 final and rebase against master, its working again but also has too much cruft just to migrate to 0.4. I've file an issue against, hopefully we get some help from there: gruntjs/grunt#700 I also want to look into replacing our custom zip task with grunt-contrib-compress, same for grunt-contrib-clean and test the update for grunt-compare-size. Not sure if we should include those here and combine the testing effort, or land this PR asap and do the other updates separately. |
I'm all for land ASAP. On Sat, Mar 2, 2013 at 7:45 AM, Jörn Zaefferer notifications@github.comwrote:
Mike Sherov |
@scottgonzalez are you okay with landing this before 1.10.2? I just did another round of testing and it looks good. |
@@ -5,6 +5,19 @@ module.exports = function( grunt ) { | |||
var path = require( "path" ), | |||
fs = require( "fs" ); | |||
|
|||
function expandFiles( files ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this expandFiles()
different than the other? Why don't we just expose it instead of redefining it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other one is used directly, and only points at files. This one is used via tasks and gets folder wildcards as inputs. Folders have to be filtered out.
I'm not sure what you mean with "expose it instead of redefining it".
See also gruntjs/grunt#700
If you've tested the release script, then we can land it. |
The release script still runs "grunt prepare" inside the DB module, but we don't need that anymore, right? I mean, |
Ok, so let's remove the invocation for the Let's just ignore the |
…unt-css and grunt-html, update custom tasks. Drop qunit-junit plugin, not worth the trouble. Update release script to run grunt-prepare after npm-install.
Probably our fastest build ever, mostly due to the theme generation change. 25 seconds to run the full |
Rename to Gruntfile, upgrade to newer grunt-css and grunt-html, update custom tasks. Drop qunit-junit plugin, not worth the trouble. Update release script to run grunt-prepare after npm-install.
tree diff between old and new dist:
File diff (
diff -r -w -q dist dist-0-3/
): https://gist.github.com/fb016517fa530ca75213The banner creation changed: Whitespace is now more consistent, but slightly different. The "Includes: jquery.ui.[component]" line from non-concat files is gone.
Minifiers changed: grunt-contrib-uglify uses uglify2, grunt-css uses clean-css (instead of squish), so all minified files are different as well.
I've dropped the qunit-junit plugin instead of replacing it with the 0.4 compatible grunt-qunit-junit since that doesn't really work yet and the junit reports have provided no value to us while we were using
I'm done here, but would like someone to review and test before a merge to master.