-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Src: Refactored modules to allow external coupling #522
Conversation
This is also a step to use require module builder like this: https://github.com/jquery/jquery-mobile/blob/master/Gruntfile.js#L241 More ref: https://github.com/gruntjs/grunt-contrib-requirejs |
This diff is nearly impossible to reason about. You should redo this in several small commits. |
No problem, I'll split it and after reviewing you choose if it's needed to squash. |
Thanks. That'll make it much easier to review and provide feedback. |
I'm still trying, but that's a really difficult split. :) 2014-02-03 Scott González notifications@github.com:
|
@scottgonzalez Did it. Now I have to say it was the most difficult split I ever did. Some commits may look dumb, but I did the split step by step to make the PR easy to review. Looking forward to a feedback. Thanks! |
files: { | ||
src: [ "test/**/*.js" ] | ||
nonDist: { | ||
gruntfile: [ "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.
I don't think multiple levels like this works. It doesn't throw because "src" is a special property in this position, the others are ignored and considered custom properties. It is only linting the 7 files from concat.scoped.src
and not the gruntfile or tests.
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.
omg, my fault. fixing.
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, thanks
BTW, the |
I suspect a lot of the whitespace changes aren't even necessary, since we have a rule of not indenting the first level inside a function scope. Under spacing in the style guide:
Apart from that I wonder if it wouldn't make more sense to go directly to AMD modules. jQuery Core is probably a better reference then jQuery Mobile, since we only need to distribute a single file in the end. The way jQuery Core includes Sizzle might also be a good model here for including external modules. |
It's relative easy to remove the re-indentation from files. I did this patch as a step to go to AMD and it's not the best solution. I'll try to improve this. |
both functions are used only on that file methods
only used on that file
function used only on that file
and setting it to check for scoped files
plus minor code style fixes
I reverted the indentation to follow the mentioned rule. I made it in a dumb commit and I can further apply it in the other commits. At this point, I'm ok to close this PR and rethink in a better implementation. |
Yeah, I think we need an approach that is in line with our other projects. Using AMD would make sense, but as you know, there's still a lot of discussions going on about AMD etc. |
This is a really big commit.
I changed the way the modules are built to improve some process:
I detected some whitespace issues in the process but fixed only few, I'm planning to fix this later.