Giter Site home page Giter Site logo

713victor / gutenberg-desktop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automattic/gutenberg-desktop

0.0 1.0 0.0 2.36 MB

Desktop Gutenberg without WordPress.

License: GNU General Public License v2.0

JavaScript 87.33% HTML 2.53% SCSS 9.16% EJS 0.97%

gutenberg-desktop's Introduction

Gutenberg Desktop

What happens when Gutenberg and Electron are mashed together.

As with other Electron apps there are two basic components:

  • The main app, running inside Electron. This provides the native side of things, and starts the web renderer
  • The web renderer, where the web app runs.

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:

  • Plain Text Editor - standalone JS file that can replace any textarea on any page with a full Gutenberg editor
  • Gutenberg Everywhere - a WordPress plugin to add Gutenberg to comments, WP admin pages, bbPress, and BuddyPress
  • Gutenberg Chrome Extension - a Chrome extension that allows Gutenberg to be used on any page
  • P2 - WordPress as a collaborative workspace (coming soon for self-hosted)
  • Editor Block - a block that allows an editor to be added to a page (coming soon)

Directories

  • app - Contains the full app, including main Electron code and the compiled web app Most of the files here are copied or compiled, except:
    • index.js - The entry point to the Electron, which loads index.html inside the web renderer
    • preload.js - Loaded by the web renderer, but with access to Electron
  • editor - contains the web renderer app. This is where Gutenberg lives
  • build - Contains packaging files for the distribution
  • dist - Contains distribution files

Development

You 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-compiled
  • yarn start - this starts Electron, and points it at the development webpack

Hot 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.

Production

To get a production copy:

  • yarn build-editor - builds app/editor.build.js, which is bundled with the main Electron app
  • yarn start - start Electron and points it at app/editor.build.js

Packaging for distribution

  • yarn build-editor - make sure we have the latest code
  • yarn pack - generates package files, but doesn't bundle them. Useful for testing.
  • yarn dist - builds full package bundles

You will need a MacOS signing certificate.

To generate the icons:

  • iconutil -c icon.icns icons

To convert to Windows .ico use https://convertico.com/

Publishing

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.

gutenberg-desktop's People

Contributors

johngodley avatar mkaz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.