[wp-trac] [WordPress Trac] #41870: Code Editor: Add grunt task for building new CodeMirror bundles from external dependencies
WordPress Trac
noreply at wordpress.org
Sat Apr 14 02:59:17 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):
I was playing around with the CodeMirror instance, attempting to add a
CoffeeScript mode, and noticed that CodeMirror is acting as if it's in
CommonJS environment instead of Browser environment.
The static bundler (whether Webpack, Rollup, or Browserify) causes this
issue, and the issue prevents being able to add Modes, even via the
included loadmode.js plugin.
It might be better to just use grunt/gulp concatenate and minify (wrapped
in an IIFE to place it in wp.CodeMirror).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41870#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list