Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#15052 closed bug (fixed)

grunt uglify is missing files

Reported by: Théodore Biadala Owned by: Scott González
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()
	}
}

Change History (6)

comment:1 Changed 2 years ago by Scott González

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?

comment:2 Changed 2 years ago by Théodore Biadala

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!

comment:3 in reply to:  2 Changed 2 years ago by Scott González

Replying to 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.

comment:4 Changed 2 years ago by Théodore Biadala

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

comment:5 Changed 2 years ago by Scott González

Milestone: none1.12.2
Resolution: fixed
Status: openclosed
Last edited 2 years ago by Ryan J Ollos (previous) (diff)

comment:6 Changed 2 years ago by Scott González

Owner: set to Scott González

In c218bee:

Build: Fix list of source files

Fixes #15052
Closes gh-1751

Note: See TracTickets for help on using tickets.