Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25159 closed defect (bug) (fixed)

Grunt: concatenate and compress TinyMCE

Reported by: azaozz's profile 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 11 years ago.
25159.2.patch (4.6 KB) - added by azaozz 11 years ago.
25159.3.patch (4.6 KB) - added by azaozz 11 years ago.
25159.4.patch (677 bytes) - added by azaozz 11 years ago.

Download all attachments as: .zip

Change History (17)

@azaozz
11 years ago

#1 @azaozz
11 years 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 11 years ago by azaozz (previous) (diff)

@azaozz
11 years ago

#2 @azaozz
11 years ago

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

@azaozz
11 years ago

#3 @azaozz
11 years ago

25159.3.patch is a refresh of 25159.2.patch.

#4 @nacin
11 years ago

In 25188:

Build tinymce.js.gz using grunt.

props azaozz.
see #25159.

#5 @nacin
11 years ago

In 25189:

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

see #25159 and [25188].

#6 follow-up: @TobiasBg
11 years 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.

#7 in reply to: ↑ 6 @SergeyBiryukov
11 years 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.

#8 @azaozz
11 years 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.json.

Last edited 11 years ago by azaozz (previous) (diff)

@azaozz
11 years ago

#9 @azaozz
11 years ago

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

#10 @azaozz
11 years 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.

#11 @DrewAPicture
11 years ago

  • Keywords has-patch added

@azaozz: What's left with this?

#12 @nacin
11 years ago

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

#13 @SergeyBiryukov
11 years ago

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