Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44987 closed enhancement (duplicate)

Try including WordPress packages: Shortcode

Reported by: youknowriad's profile youknowriad Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: javascript Cc:

Description (last modified by SergeyBiryukov)

In this issue, I'm trying to use The @wordpress/shortcode package in WordPress instead of the built-in shortcode.js file.

This is meant to prove how we can include WordPress packages in WordPress Core and ultimately merge Gutenberg into Core.

  • Small refactoring to webpack configs to avoid duplication between dev and prod
  • Adding wp-polyfill and lodash scripts (new vendors used by Gutenberg scripts)
  • I'm including the @wordpress/shortcode package in an enqueue script like that: window.wp.shortcode = require( '@wordpress/shortcode' ); mainly because using the library webpack config to generate the globals is not working reliably because of the other bundled scripts in Core that are not packages (it could be revisited later once we have more packages).
  • Unfortunately, the jshint config is a bit outdated and doesn't match what we discussed in #core-js meeting yet, I wasn't able to use const or import in the enqueue script (we should address the jshint => eslint replacement in a separate ticket)

The first bit of JavaScript from Gutenberg is making its way into WordPress :)

Attachments (2)

shortcode-package.patch (31.2 KB) - added by youknowriad 6 years ago.
shortcode-package.2.patch (30.7 KB) - added by youknowriad 6 years ago.
Remove unused function

Download all attachments as: .zip

Change History (12)

#1 @youknowriad
6 years ago

Oh btw, the memize dependency is temporary and should be removed after this gutenberg PR lands https://github.com/WordPress/gutenberg/pull/10140

@youknowriad
6 years ago

Remove unused function

#2 @youknowriad
6 years ago

  • Type changed from defect (bug) to enhancement

#3 @SergeyBiryukov
6 years ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 5.0

#4 @SergeyBiryukov
6 years ago

Didn't mean to edit the description, not sure what happened here :)

This ticket was mentioned in Slack in #core-js by adamsilverstein. View the logs.


6 years ago

This ticket was mentioned in Slack in #core-editor by youknowriad. View the logs.


6 years ago

This ticket was mentioned in Slack in #core by matias. View the logs.


6 years ago

This ticket was mentioned in Slack in #core-js by netweb. View the logs.


6 years ago

#9 @youknowriad
6 years ago

  • Milestone 5.0 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

This served its purpose as a baseline for #45065 which just landed. We can close this ticket now.

This ticket was mentioned in Slack in #core-js by aduth. View the logs.


6 years ago

Note: See TracTickets for help on using tickets.