-
Notifications
You must be signed in to change notification settings - Fork 74
Super simplify UI 1.12.0 Builder #255
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
Comments
@rxaviers something like this would make sense, considering this needs to be used by both ui, and mobile. To have it as general as possible will be a good thing. |
A few concerns off the top of my head:
|
Yeap, this would make the merge a lot smoother. |
Just as a note on the current mobile builder, and how it works, its not specific to mobile its a generic amd builder. |
Not really. Deferreds will do it. Minifying the final JS (or CSS) bundle is simply minifying a deferred after it has been resolved. No dependency logic needs to take place.
I have no objection if instead you want to use a committed external file from the jQuery UI repo, e.g., |
Yeap, we know. Anything in particular we are missing? |
So we'll convert the source files to promises? That sounds like a pretty clean approach.
I'm fine with that or anything else that describes the action.
Yeah, I think that makes more sense. That way it just points to a local file like all the other source files. |
Source files don't need to be converted into promises. But, the actions do. The way I'm thinking is an action (e.g., minify) can take as an input the promise of another action (e.g., the JS bundle built by require.js optimizer). Anyway, we don't need to use a JSON configuration here if not appropriate. We could use a JS commonJS file similarly to https://github.com/jquery/jquery-release if it helps. What is important is that the lowlevel engine of the builder can be abstracted, so the package can be easily configured/customized. |
By the way, I'm looking for ideas on how we could accomplish that... Mimicking https://github.com/jquery/jquery-release, follow an alternative suggestion. var ThemeRoller = require( "themeroller" );
var amdBuilder = require( "amd-builder" );
var cssBuilder = require( "css-builder" );
module.exports = function( Package, runtime ) {
Package.define({
// shallow copy from source files.
"external/jquery.js": "external/jquery/jquery.js",
"images": function( callback ) {
new ThemeRoller( runtime.vars ).doImages( callback );
},
"index.html": function() {
return renderTemplate( runtime.components );
},
"jquery-ui.css": function( callback ) {
when( structureCss, themeCss). done(function( structure, theme ) {
callback( banner + concat( structure, theme ) );
});
},
"jquery-ui.js": function( callback ) {
amdBuilder({
include: runtime.components
}, callback );
},
...
});
}; |
Agree. |
- Handle CSS dependencies from JS comments (based on jQuery Mobile); - Use archive-packager, builder-amd and builder-jquery-css to build UI 1.12.0 download package; Fixes #178 Fixes #255 Ref jquery/jquery-ui#1440
- Handle CSS dependencies from JS comments (based on jQuery Mobile); - Use archive-packager, builder-amd and builder-jquery-css to build UI 1.12.0 download package; Fixes #178 Fixes #255 Ref jquery/jquery-ui#1440
- Handle CSS dependencies from JS comments (based on jQuery Mobile); - Use archive-packager, builder-amd and builder-jquery-css to build UI 1.12.0 download package; Fixes #178 Fixes #255 Ref jquery/jquery-ui#1440
Was this issue really addressed? Seems like a bad reference. |
Yeap, it has been addressed. The package is now defined in its entirety by |
jQuery UI 1.12 has adopted the Mobile way to declare its CSS dependencies using JS comments. Given this step, we are able to super generalize builder. For example, the following JSON could be used as a configuration-guide on how to build the package.
Maintenance/changes for the package content could ideally be adjusted by fixing the configuration JSON instead of changing the download builder (the builder code).
The idea is having a builder API similar to
Builder( configuration, runtime );
. For example:The text was updated successfully, but these errors were encountered: