Opened 12 months ago

Closed 9 months ago

#15089 closed bug (notabug)

bower distribution of jquery-ui does not include minified widgets

Reported by: ajssd Owned by:
Priority: minor Milestone: 1.12.2
Component: [meta] ui.build Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description

We download jquery-ui using bower, and we AMD 'require' it in using require.js. Roughly something like:

requirejs.config({
	paths: {
		'jquery-ui': 'bower_components/jquery-ui/ui',
        }
});

And then we do something like

   require("jquery-ui/widgets/sortable" ...)

but that points to non-minified code. I would have expected to configure requirejs like this:

requirejs.config({
	paths: {
		'jquery-ui': 'bower_components/jquery-ui/ui/minified',
        }
});

since there is a minified copy of all files like form.js, tabbable.js, etc. in the minified directory.

BUT the problem is there is no minified/widgets directory. All the files in the 'ui' directory (AND any sub-directories like widgets and effects) should ALSO be in the minified directory.

That way, requirejs can point to either jquery-ui/ui or jquery-ui/ui/minified and get the same set of files.

Change History (5)

comment:1 Changed 12 months ago by Scott González

Resolution: notabug
Status: newclosed

You should be minifying on your own.

comment:2 Changed 12 months ago by ajssd

I realize I can create a minified version of these files on my own, but that's not the answer here. It's clear that jquery-ui intentionally publishes minified versions of (almost) all its files, so the answer "you should be minifying on your own" doesn't make sense. There is a special 'minified' directory containing them. Same as most other software packages like jQuery, knockout, so on so on. The minified files are useful and easy to consume.

Question is -- why would jquery-ui publish SOME minified files but not all. By doing so, it makes it impossible to require in the 'widgets' because there is no 'minified/widgets' directory.

I really think this is just an oversight.

Can you please take a look at your scripts that publish to bower and include the minified versions of widgets?

comment:3 Changed 12 months ago by Scott González

Resolution: notabug
Status: closedreopened

comment:4 Changed 9 months ago by Scott González

Milestone: none1.12.2
Status: reopenedopen

comment:5 Changed 9 months ago by Scott González

Resolution: notabug
Status: openclosed

When I tried to fix this, I realized it's impossible to fix because of my original point... You should be minifying on your own. We removed individual minified files from distributions a while ago.

Question is -- why would jquery-ui publish SOME minified files but not all.

That's a good question, but the answer is that *we* don't. The bower distributions are unofficial and maintained by the community. There is no published script for how that repo gets populated, so all I can do is point you to their bug tracker

Note: See TracTickets for help on using tickets.