Desktop Gutenberg without WordPress.
GPL-2.0 License
What happens when Gutenberg and Electron are mashed together.
As with other Electron apps there are two basic components:
Communication between the two parts is through the functions exposed in preload.js
Note that this is a proof of concept.
The extension uses the Isolated Block Editor. This can also be found in:
textarea
on any page with a full Gutenberg editorapp
- Contains the full app, including main Electron code and the compiled web appindex.js
- The entry point to the Electron, which loads index.html
inside the web rendererpreload.js
- Loaded by the web renderer, but with access to Electroneditor
- contains the web renderer app. This is where Gutenberg livesbuild
- Contains packaging files for the distributiondist
- Contains distribution filesYou can start the app in development mode by running both of these commands:
yarn start-editor
- this will start webpack in development mode, and any changes will be auto-compiledyarn start
- this starts Electron, and points it at the development webpackHot reloading is not enabled yet and you may need to reload pages.
Note that any changes to the main Electron code will require Electron to be restarted.
To get a production copy:
yarn build-editor
- builds app/editor.build.js
, which is bundled with the main Electron appyarn start
- start Electron and points it at app/editor.build.js
yarn build-editor
- make sure we have the latest codeyarn pack
- generates package files, but doesn't bundle them. Useful for testing.yarn dist
- builds full package bundlesYou will need a MacOS signing certificate.
To generate the icons:
iconutil -c icon.icns icons
To convert to Windows .ico use https://convertico.com/
Create a draft release on Github and set the tag to vX.X.X
(with the version filled in from package.json
).
yarn pub
Your Github token will need to exist in the GH_TOKEN
environment variable. Create it from https://github.com/settings/tokens as a personal access token with scope repo
The release will then be uploaded to the draft and can be published when ready.