Skip to content

Make DB not dependent on jquery-ui generating a build #146

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

Closed
wants to merge 37 commits into from

Conversation

rxaviers
Copy link
Member

Summary: (the goal)

  • To build jquery-ui (concatenate, minify, change banner, change @VERSION variable, etc) by our own. This is: drop requirement to prepare the jquery-ui files by running its build, and release tasks. (Obs: DB still requires to prepare the jquery-ui files running its manifest task.)
  • Avoid to break anything, including third-parties (jqueryui.com and jquery-ui and its tasks that depends on DB).
  • Facilitate the cutoff duplicate parts work with jquery-ui, ie. bring release process from jquery-ui into DB.

Tests: (making sure this PR is good)

  1. jshint and npm test, of course. Actually, they pass in each commit separately.
  2. Make sure we keep building good solid packages. Follow a diff view between the package downloaded from live site vs. a package downloaded with the code of this PR. Note you will find differences: (a) ignore the images, (b) this PR actually fixes things (see below).
  3. On jquery-ui, grunt generate_themes and grunt release_themes passes.
  4. On jqueryui.com, grunt build-download build-packages needs a slight change PR Grunt: Change db path from release to jquery-ui jqueryui.com#55.

Changes: (the details)

  • Make DB not dependent on jquery-ui release task. Along with that, I've renamed the Release lib for jQueryUI (and release path for jquery-ui), so we don't make confusion with the release procedure.
  • Make DB not dependent on jquery-ui build task. Note, it's using the default options of uglifyjs-2 and sqwish (for css).
  • Cache built files. Since we are building it, it's being cached for performance. Actually, I've split the build (Builder) of the packaging (Packer) part. And actually2, since I've split them, it was more clear that we could cache more things. So, downloads are 12.5% faster.
  • Organization. I made files manipulation more uniform across jQueryUI, Builder, Packer libs. They all use Files, which extends an Array and adds methods to make its usage more clean in Packer (see into(), and rename()).

Related PRs

rxaviers added 24 commits May 17, 2013 08:51
- also rename release -> jquery-ui;
- rename Builder#writeTo to Builder#zipTo;
…ass, show, switchClass, toggle, and toggleClass demos
…eClass, show, switchClass, toggle, and toggleClass demos are included when effect core is
- Add ';' separator between copyright and licenses, eg.
  "Copyright 2013 jQuery Foundation and other contributors; Licensed MIT";
- Add a line break between banner and code;
- Add `jquery.ui.theme.css` in the includes list of bundle css'es (it was
  missing);
- Unbinds ThemeRoller from JqueryUi.find(), ie. from the prepared files of the
  config file. Therefore, it can be used independently;
… cleaner

add( src, dst ) -> add( src, dst, [ data ] )
… chaining more straightforward

- Along with related changes, builder helper add method changed as below:
  add( src, dst, [ data ] ) -> add( file ) or add( src, data )
@rxaviers
Copy link
Member Author

@scottgonzalez @jzaefferer some commits for your appreciation :)

}
});

module.exports = Files;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried not to use proto (which is a non-standard). But, in my alternatives, length doesn't work properly, and therefore .map, .forEach, .concat, ... don't work properly too.

We need to check whether we are ok using this code, knowing we only use it in a controlled environment. After all, the above code works like a charm. :)

I've talked with @rwldrn and I learned ES6 will have a smarter object initialization. On ES5, it is not possible to subclass a built-in. But, ES6 will eventually make it possible.

I wonder if we can leave a TODO note above stating that as soon as our env supports ES6, we rewrite it in the proper way OR we use an alternative code that isn't too much complex.

], function( err ) {
// Make grunt to quit properly. Here, a proper error message should have been printed already.
// 1: true on success, false on error
done( !err /* 1 */ );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment

@rxaviers
Copy link
Member Author

Closed by 84b5074

@rxaviers rxaviers closed this Jun 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants