WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 7 months ago

Last modified 5 months ago

#25159 closed defect (bug) (fixed)

Grunt: concatenate and compress TinyMCE

Reported by: azaozz Owned by:
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.7
Component: General Keywords: has-patch
Focuses: Cc:

Description

Add concatenation and compression modules to Grunt and make wp-tinymce.js.gz.

Attachments (4)

25159.patch (4.4 KB) - added by azaozz 8 months ago.
25159.2.patch (4.6 KB) - added by azaozz 8 months ago.
25159.3.patch (4.6 KB) - added by azaozz 8 months ago.
25159.4.patch (677 bytes) - added by azaozz 8 months ago.

Download all attachments as: .zip

Change History (17)

azaozz8 months ago

comment:1 azaozz8 months ago

In 25159.patch:

  • Add "grunt-contrib-compress" and "grunt-contrib-concat" modules.
  • Set them to concat and gzip wp-tinymce.js.gz.

Wondering if we should remove wp-tinymce.js.gz from /src. It is unreachable as /src cannot run without SCRIPT_DEBUG = true.

Last edited 8 months ago by azaozz (previous) (diff)

azaozz8 months ago

comment:2 azaozz8 months ago

25159.2.patch​ also adds creation date/time and source paths for the concatenated TinyMCE parts.

azaozz8 months ago

comment:3 azaozz8 months ago

25159.3.patch is a refresh of 25159.2.patch.

comment:4 nacin8 months ago

In 25188:

Build tinymce.js.gz using grunt.

props azaozz.
see #25159.

comment:5 nacin8 months ago

In 25189:

Remove wp-tinymce.js.gz from develop.svn, as this is now part of the build process.

see #25159 and [25188].

comment:6 follow-up: TobiasBg8 months ago

Due to the banner with the current time (banner: '// Created: <%= grunt.template.today("UTC:yyyy-mm-dd HH:MM:ss Z") %>\n',), wp-tinymce.js changes every time the build process is run, and due to that, wp-tinymce.js.gz also changes.

This has lead to several sync commits to the "old" core.svn. having wp-tinymce.js.gz in them today.

comment:7 in reply to: ↑ 6 SergeyBiryukov8 months ago

Replying to TobiasBg:

This has lead to several sync commits to the "old" core.svn. having wp-tinymce.js.gz in them today.

Indeed, every changeset in http://core.svn.wordpress.org/trunk now has wp-tinymce.js.gz in the list of modified files.

comment:8 azaozz8 months ago

Generally that banner is nice-to-have, non essential. Lets remove it for now. Perhaps this can be replaced with importing some info from package.js.

Version 0, edited 8 months ago by azaozz (next)

azaozz8 months ago

comment:9 azaozz8 months ago

Actually 25159.4.patch works quite well. Reads package.json as per the example and uses name and version for the banner.

comment:10 azaozz8 months ago

In 25200:

Remove the banner when concatenating TinyMCE so wp-tinymce.js.gz doesn't change every time the build process is run. See #25159.

comment:11 DrewAPicture7 months ago

  • Keywords has-patch added

@azaozz: What's left with this?

comment:12 nacin7 months ago

  • Resolution set to fixed
  • Status changed from new to closed

comment:13 SergeyBiryukov5 months ago

  • Version changed from trunk to 3.7
Note: See TracTickets for help on using tickets.