commit | 7c94eb2fd3cdea33a200ae7c73c19777ca865a41 | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Sat Apr 24 10:02:27 2021 +0200 |
committer | David Ostrovsky <david@ostrovsky.org> | Sat Apr 24 10:37:36 2021 +0200 |
tree | b5c5c7530a03bb738d78f24202c35daf04fbe604 | |
parent | 30c774f30c1709f71efc250a195dd6fb50c7503b [diff] |
Bazel: Don't use assets parameter in polygerrit_plugin rule All assets parameter does is add its content to the output. We don't really need it, as we add the assets into static directory of plugin artifact in genrule anyway. Given that this plugin is the only caller site that is using assets parameter, we can kill it now in gerrit core and simplify polygerrit_plugin rule. Change-Id: I54d4a910631c9410883b7fd64ba0d88638f9d579
A plugin that uses CodeMirror to provide a rich code editing experience in PolyGerrit.
This plugin is rewritten into Polymer 3 syntax. The gr-editor.js
is the main entry for the plugin.
But to support the lazy load on the codemirror
with supported languages, we still have the codemirror-element.html
as an asset which still built separately as an html.
We may consider drop the selectively language support and in favor of all-in-one bundle in the future or change build rule to support bundle css
in js
to move off of the html completely.
To run UI tests here will need install dependencies from both npm and bower.
npm run wct-test
should take care both for you, read more in package.json
.
You will need polymer-bridges
which is a submodule you can clone from: https://gerrit-review.googlesource.com/admin/repos/polymer-bridges
As polymer 3 no longer support Polymer.importHref
anymore, this plugin still supports it through a custom implementation in gr-editor.js
.
bazel build :codemirror_editor
gerrit/plugins/codemirror-editor/
folder and it will automatically served at http://localhost:8081/plugins_/codemirror-editor/
If your plugin is already enabled, then you can block it and then inject the compiled local verison.
See more about how to use dev helper extension to help you test here: https://gerrit.googlesource.com/gerrit-fe-dev-helper/+/master