Add CodeMirror update and usage of requireJS to migration guide (#187)
authorMatthias Schmidt <gravatronics@live.com>
Mon, 14 Jun 2021 05:52:41 +0000 (07:52 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Jun 2021 05:52:41 +0000 (07:52 +0200)
* Add CodeMirror update and usage of requireJS to migration guide

Close #186

* Improve wording in CodeMirror migration guide

Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
docs/migration/wsc54/javascript.md [new file with mode: 0644]
mkdocs.yml

diff --git a/docs/migration/wsc54/javascript.md b/docs/migration/wsc54/javascript.md
new file mode 100644 (file)
index 0000000..83d382b
--- /dev/null
@@ -0,0 +1,10 @@
+# Migrating from WSC 5.4 - TypeScript and JavaScript
+
+## CodeMirror
+
+CodeMirror, the code editor we use for editing templates and SCSS, for example, has been updated to version 5.61.1 and we now also deliver all supported languages/modes.
+To properly support all languages/modes, CodeMirror is now loaded via the AMD module loader, which requires the original structure of the CodeMirror package, i.e. `codemirror.js` being in a `lib` folder.
+To preserve backward-compatibility, we also keep copies of `codemirror.js` and `codemirror.css` in version 5.61.1 directly in `js/3rdParty/codemirror`.
+These files are, however, considered deprecated and you should migrate to using `require()` (see `codemirror` ACP template).
+
+See [WoltLab/WCF#4277](https://github.com/WoltLab/WCF/pull/4277) for more information.
index d3dd4492cda14886c257b8577fd6eeeec8515111..b3fe8f0aa817449e7c6aa294e219258484ada32a 100644 (file)
@@ -110,6 +110,7 @@ nav:
   - 'Migration':
     - 'Migrating from WSC 5.4':
       - 'PHP API': 'migration/wsc54/php.md'
+      - 'TypeScript and JavaScript': 'migration/wsc54/javascript.md'
     - 'Migrating from WSC 5.3':
       - 'PHP API': 'migration/wsc53/php.md'
       - 'Session Handling and Authentication': 'migration/wsc53/session.md'