Problem/Motivation
Currently the 2 custom CK5 plugins are hosted on Github.
This is nice for development but confusing when the minified file gets updated in the module without any explanation or clear connection to source code changes.
Also, the environment for working on these projects is unclear. Currently it's necessary to have a directory structure where the plugins are adjacent to a ckeditor5 repo checked out to a specific version, and with the dll:build command already run to generate the json manifest file and the other js files. Then, the minified js file must be manually copied into the module.
Proposed resolution
Move the source code for
into this module, add a webpack config & package.json file to build the minified files that currently live in js/build
Remaining tasks
Decide on directory structure for source and built js
adapt the proof of concept https://github.com/bbenjamin/cke5-multi-plugin-env
User interface changes
API changes
Data model changes
Issue fork ckeditor5-3215005
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
zrpnrGot a start on this from @bnjmnm 's https://github.com/bbenjamin/cke5-multi-plugin-env
which in turn is based on @Reinmar 's example plugin environment https://github.com/Reinmar/ckeditor5-plugin-env
This moves the 2 github repos into a new folder in the module, and uses a script to generate a manifest file from a specific tag of ckeditor5.
Then, the webpack script runs for each plugin and outputs the contents into the js/build directory.
Comment #4
wim leersI expect that somewhere in here we explicitly list all of the CKEditor 5 plugins that we are compiling into our build. For example, in #3209613: Add "Table" plugin we are adding the
tableplugin. How would that be reflected here?(For CKEditor 4 we had
core/assets/vendor/ckeditor/build-config.jsto track this.)Comment #5
wim leers@lauriii Can you respond to @zrpnr's question at https://www.drupal.org/project/ckeditor5/issues/3215005#mr34-note26285? 🙏
Comment #6
wim leers@lauriii posted that information.
Lauri and Peter are gonna pair on figuring out why it's working in one environment but not the other 👍
Comment #7
zrpnrI upgraded my version of node to match @lauriii
v15.12.0and already had the same version of yarn,
1.22.10From a fresh copy of this branch, no
node_modulesfolder, I cd'd intockeditor5/js/drupaland ran:Comment #8
lauriiiI was able to get this to work by reinstalling xcode. 🎉 I'm wondering if this would fix it for @Wim Leers too.
Comment #9
wim leersThat's absolutely bizarre! 🤪
Just tried that too. Still won't work.
But then I spotted in #7 that the first step according to @zrpnr is
yarn install. I did not do that before: I always assume that if dependencies are missing that I will get a helpful error message.So I did that, and it seemed to not do anything:
… so surely
yarn buildwill still do the same, right?WRONG! 😬
Can we document this super duper explicitly? (Or better yet: make
manifest.jsdo some sanity checks?)In any case: 🥳🥳🥳
Comment #10
zrpnrAdded docs,
Comment #11
wim leersI think we should merge this ASAP since this represents a huge leap forward. It makes it 💯 times easier to connect all dots!
I just left two remaining questions that I'd like to see answered, but they're docs-only aspects.
Comment #13
zrpnrComment #15
wim leersWe forgot one small but important thing that's only becoming obvious now that we're moving it into Drupal core: #3231400: Follow-up for #3215005: update library definitions to not point to @zrpnr's GitHub repos anymore 🙈