-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Release: Cutoff duplicate parts with download builder #951
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
@scottgonzalez @jzaefferer raise your thumbs, suggestions, comments |
I haven't reviewed the DB changes yet, just glanced at them. Though looking at the changes on this side, I wonder why there are so few deletions. This is supposed to reduce duplication, but we mostly have duplicated more code without really removing anything. You mention that you didn't change the release_cdn task. That seems to be what's prevented deleting more code. So why keep that? jquery/download.jqueryui.com#122 specifically listed all three release tasks to be moved. In addition to that I think this should be taken a step further. There's no reason for these |
I also wondered we'd have less code in here. Part of that is because the release package is not exactly the same thing of the download package. Having less code in here has the counter effect of moving more code into DownloadBuilder that wont be used there. It's totally possible. If that's the will, just let me know.
Certainly. Although, I don't see how we can use current DownloadBuilder to accomplish that. Unless we move the build tasks into DownloadBuilder as well.
Well, they are inside of grunt simply because they were there before :). But, I agree with you. Let's move them. I guess the reason they were there was because the convenience of re-using some grunt tasks. The build_* tasks have very fewer bindings to grunt. But, we still do use some stuff from grunt, eg. configs. If you are ok with the following, let's first define the above items, then we go further into this step. |
Team, request for your comments. See below. We have two clear different entities:
We have another not so clear one, kinda split in half in two different places, which is the:
Problems (that we all know): Possible solution: So, a possible solution:
I think of something really abstract and simple to use like: theme = new Theme(vars);
build = new Build(components, theme);
build.sizes(); // get bundle sizes
build.writeTo( path ); // create a path with the build files
build.zipTo( path ); // create a zip file with the build files
release = new Release();
release.writeTo( path ); // create a path with the pre-release files
release.zipTo( zipPath ); // create a zip file with the pre-release files
release = new Release({cdn: true});
release.writeTo( path ); // create a path with the release-to-cdn files
release.zipTo( zipPath ); // create a zip file with the release-to-cdn files That's it. |
The AUTHORS file generation is not part of the release script. The release script does a pre-release check to verify that the AUTHORS file is up-to-date.
For any actually released files, we should have a single code path. That's the goal of this.
There's only one place for this to be updated. We never touch the tokens inside jquery-ui.
Maybe we can get away with not using banners inside jquery-ui. Official releases will always go through the full release process anyway.
We need to find a way to tie the settings to jquery-ui. The code repo needs to control how it gets processed so that building an old version works the same as it did when the version first came out.
What are the specific things we're doing based on version?
This has always been the plan. Well, whether or not we build a CLI was never determined. But the download builder is supposed to be a simple node module and download.jqueryui.com is supposed to build on top of that. But we want all of that in a single repo.
Depending on what you mean by "build tool", that's what download builder is supposed to be.
If this includes things like building themes, I'm not sure I want this in jquery-ui.
The release tasks are supposed to go away. We already discussed that. They belong inside release.js. The size task is tied to grunt. We can ditch that, but I'd like to know what the real benefit is. We can make the grunt build much less production-ready if we want to.
It sounds like you're still asking for 3 repos. We don't want three. Two is plenty. Where does the benefit come from in having three repos?
Why can't we just keep this inside the download.jqueryui.com repo? The build task can probably just go away. I don't think we actually use it for anything, other than priming a release. @jzaefferer is there any reason to keep the build task in jquery-ui if we pull the rest of the release tasks out of grunt? |
What are the hardest things for DownloadBuilder to figure out dynamically when building a download package (or a release package)? In other words, what is needed to make DB loosely coupled from jQueryUI (absent of build tools).
solution: possibly, another manifest JSON file
solution: should not be hard to address
solution: seems addressable, but not trivial
solutions? For a more complete view, I've assembled a summary of "Big picture of the communication (input and output) between the building blocks of jQueryUI DownloadBuilder". |
For comparison, what is the hardest thing for DownloadBuilder to figure out dynamically when building a download package (or a release package) if we put the build tools into jQueryUI?
What are the downsides?
What are the Features of each one?
✝ Only during supported period. |
@rxaviers those last two comments sounds very much like the discussion we had earlier about abstracting DB into a generic tool. Unless I'm misunderstanding that, what value does that provide right now, where the goal is remove the duplication between UI and DB? |
We de-duplicate it or moving things to UI, or DB, or a third-thing. |
2.Demos: Add additional data to manifest files to list additional demos.
3.Files: I'm not sure why there needs to be any special handling here for the CSS files. Just copy every file, replace vars, inline imports, etc.
|
Should I change it like this? diff --git a/ui.effect.jquery.json b/ui.effect.jquery.json
index 839fa77..4e1f529 100644
--- a/ui.effect.jquery.json
+++ b/ui.effect.jquery.json
@@ -58,7 +58,17 @@
],
"bugs": "http://bugs.jqueryui.com/",
"homepage": "http://jqueryui.com/",
- "demo": "http://jqueryui.com/effects/",
+ "demo": [
+ "http://jqueryui.com/effect/",
+ "http://jqueryui.com/addClass/",
+ "http://jqueryui.com/animate/",
+ "http://jqueryui.com/hide/",
+ "http://jqueryui.com/removeClass/",
+ "http://jqueryui.com/show/",
+ "http://jqueryui.com/switchClass/",
+ "http://jqueryui.com/toggle/",
+ "http://jqueryui.com/toggleClass/"
+ ],
"docs": "http://api.jqueryui.com/category/effects-core/", jqueryui.com currently have a page for each of the above. Is it already listed somewhere? How jqueryui.com figures that information out? |
I'm pretty sure Scott had something else in mind for that, but can't find it. |
The |
One naive question: What is About the function approach. Do you have an example? |
http://plugins.jquery.com/docs/package-manifest/#field-demo
No, it can be whatever we want it to be. I haven't had time to do anything with it. |
It says the demo field is: "The url to the plugin demo or demos". What we currently have for effects core isnt accurate then.
Ideas:
Which sounds better for you? Any other one? |
We have the very same analogous situation with docs of effect-scale, its json manifest file lists Scott, what's the implication of optionally using an Array on those fields ( |
Guys, I wait for your feedback on the above to keep going... |
repo = remote; | ||
} else { | ||
repo = "git@github.com:" + remote + ".git"; | ||
} | ||
_bootstrap( fn ); |
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.
When running the release script in "dry-run mode", I was wasting too much time to download a github repo all the time. So, I've added the above to allow a filesystem repo to be used.
This change is in a separate commit to make it easier to be removed if wanted.
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.
This is fine, but can you amend the commit to also add a note in the usage section at the top?
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.
added
output = [], | ||
themeGallery = downloadBuilder.themeGallery( jqueryUi ); | ||
|
||
echo("Build CDN Package"); |
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.
Same as the comment above about spacing and phrasing.
Reviews fixed |
|
||
"use strict"; | ||
|
||
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, preRelease, repo, | ||
var baseDir, downloadBuilder, repoDir, prevVersion, newVersion, nextVersion, tagTime, path, preRelease, repo, |
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.
remove the path
var here, it gets defined below
I've landed things on DB... Do you want to do a final test by running the release script before we land this one too?
|
The |
Well remembered. There should be no About grunt.registerTask( "build", [ "concat", "uglify", "cssmin", "copy:dist_units_images" ] ); |
Ah, right, we use that to run unit tests with minified sources. Deserves a line comment. Otherwise looking good. How do I test this? The |
PS: for the record
|
@jzaefferer aside from Three things that needs double checking are:
|
I'm trying to test the updated release script. To have something to compare to, I'm trying to run the release script from master. For that I had to modify the script, since I can't figure out the With that in place, it fails at the generate_themes task:
Stacktrace for that:
|
Managed to get the release working by changing the script to install DB@1.10.3-3 (instead of -4). I've got the result in two repos, one for the updated script: https://github.com/jzaefferer/jquery-ui Along with the two commits, I compared the content of "jquery-ui-1.11.0-cdn.zip". The new release script doesn't create a I'm not super confident on the thoroughness of my testing, but I think this is good to go. |
We definitely need a better dependency control inside the release script. Currently, we install the latest version of each dependencies. So, it's subject to get broken. :P |
Well, make a start and add it as part of this PR? |
Added. Although, note that previous versions of this script won't be fixed. Because, they use grunt tasks which, in turn, required users to install download.jqueryui.com manually. |
Fixes jquery/download.jqueryui.com#122.
Related changes: