[wp-trac] [WordPress Trac] #41870: Code Editor: Add grunt task for building new CodeMirror bundles from external dependencies

WordPress Trac noreply at wordpress.org
Wed Apr 18 03:02:41 UTC 2018


#41870: Code Editor: Add grunt task for building new CodeMirror bundles from
external dependencies
-------------------------------------------+------------------------------
 Reporter:  westonruter                    |       Owner:  adamsilverstein
     Type:  task (blessed)                 |      Status:  assigned
 Priority:  normal                         |   Milestone:  5.0
Component:  Build/Test Tools               |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch early needs-testing  |     Focuses:  javascript
-------------------------------------------+------------------------------

Comment (by WraithKenny):

 @netweb Yes, I guess my point is that using Webpack for packaging
 CodeMirror should be avoided as it makes it so it can't be extended at all
 in the browser.

 Also, while creating a gulp build that concatenates the files for the
 browser environment, I noticed 2 addons are bundled that definitely should
 be avoided:

  1. runmode/runmode-standalone.js
  2. tern/worker.js

 tern/worker.js appears to be a demo script that adds globals for a 3rd
 party (same author as CodeMirror) library integration for example
 purposes.

 runmode-standalone.js shouldn't be bundled, as it's a standalone syntax
 highlighter (as opposed to editor). It's useful as a very light-weight
 highlighter that reuses CodeMirror's mode files, but it should be
 separated, not bundled (will cause errors).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/41870#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list