Skip to main content

Search and Top Navigation

#15052 closed bug (fixed)

Opened September 25, 2016 11:56AM UTC

Closed September 27, 2016 12:45PM UTC

Last modified September 28, 2016 10:02PM UTC

grunt uglify is missing files

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

I'm looking at upgrading Drupal version of jQuery UI but since 1.12 and the folder change of some effects and widgets, the uglify tasks is missing a lot of files, everything that is in widgets/* and effects/* essentially. We're using the individual files so this is preventing up from upgrading (for reference: https://www.drupal.org/node/2533498)

$ grunt uglify
Running "uglify:main" (uglify) task
>> Destination dist/jquery-ui.min.js not written because src files were empty.
>> No files created.

Running "uglify:i18n" (uglify) task
>> Destination dist/i18n/jquery-ui-i18n.min.js not written because src files were empty.
>> No files created.

Running "uglify:ui/core.js" (uglify) task
>> 1 file created.

Running "uglify:ui/widget.js" (uglify) task
>> 1 file created.

Running "uglify:ui/mouse.js" (uglify) task
>> Destination dist/minified/mouse.js not written because src files were empty.
>> No files created.

Running "uglify:ui/draggable.js" (uglify) task
>> Destination dist/minified/draggable.js not written because src files were empty.
>> No files created.

Running "uglify:ui/droppable.js" (uglify) task
>> Destination dist/minified/droppable.js not written because src files were empty.
>> No files created.

Running "uglify:ui/resizable.js" (uglify) task
>> Destination dist/minified/resizable.js not written because src files were empty.
>> No files created.

Running "uglify:ui/selectable.js" (uglify) task
>> Destination dist/minified/selectable.js not written because src files were empty.
>> No files created.

Running "uglify:ui/sortable.js" (uglify) task
>> Destination dist/minified/sortable.js not written because src files were empty.
>> No files created.


By tweaking the Gruntfile.js I was able to get the rest of it by adding this to the minify object (but then there are leftover js files in dist) :

dynamic_mappings: {
	files: [
		{
			expand: true,
			cwd: 'ui/',
			src: ['**/*.js'],
			dest: 'dist/minified',
			ext: '.min.js'
		}
	],
	options: {
		banner: createBanner()
	}
}
Attachments (0)
Change History (6)

Changed September 26, 2016 01:22PM UTC by scottgonzalez comment:1

status: newopen

PR: https://github.com/jquery/jquery-ui/pull/1751

You should know that this is not an officially supported way to handle a build though. This task can go away at any time without warning. Why are you not using source files and minifying yourself?

Changed September 26, 2016 07:06PM UTC by theodoreb comment:2

I didn't know it wasn't supported, nothing was said so since it was there I assumed it was supported.

We don't have any js tool in drupal core everything is manual. We should probably have something but we didn't need it so far. Now that I know we can plan for it. (even if it's just taking the current build file and maintaining it ourselves)

Thanks!

Changed September 26, 2016 07:37PM UTC by scottgonzalez comment:3

Replying to [comment:2 theodoreb]:

I didn't know it wasn't supported, nothing was said so since it was there I assumed it was supported.

In general, all code that does not have documentation is not supported.

Changed September 26, 2016 07:46PM UTC by theodoreb comment:4

Good to know, it's the other way around for Drupal :þ

Changed September 27, 2016 12:45PM UTC by rjollos comment:5

_comment0: Fixed in [https://github.com/jquery/jquery-ui/commit/c218bee80d7b7858b7e2b7c44d01d6995a18b6e4 c218bee80d7b7858b7e2b7c44d01d6995a18b6e4].1475100152591850
milestone: none1.12.2
resolution: → fixed
status: openclosed

Changed September 28, 2016 10:02PM UTC by scottgonzalez comment:6

owner: → scottgonzalez

In [changeset:"c218bee80d7b7858b7e2b7c44d01d6995a18b6e4" c218bee]:

#!CommitTicketReference repository="" revision="c218bee80d7b7858b7e2b7c44d01d6995a18b6e4"
Build: Fix list of source files

Fixes #15052
Closes gh-1751