rekit icon indicating copy to clipboard operation
rekit copied to clipboard

plugin install

Open conarwelsh opened this issue 7 years ago • 4 comments

Firstly, great work on this project, its truly awesome and has a ton of potential!

I created 2 plugins to adapt to my workflow, which are working beautifully. However I have some setup/teardown functionality that needs to be done on install/uninstall of the plugins. This line should be calling my custom install.js after running rekit install my-plugin. However I need access to rekit-core during my install script to use its utilities, however it is not passed. It would be wonderful to simply adjust the lines from:

// It's plugin's responsibility to handle multiple installation
require(installFile)(); // eslint-disable-line

to

// It's plugin's responsibility to handle multiple installation
require(installFile)(rekitCore); // eslint-disable-line

Also in this file there is the install and uninstall functions which is where I originally wrote the required logic, however I cannot find a time where either of those functions are called. In fact I do not see any type of uninstall functionality for a plugin anywhere.

Lastly... my plugins add 3 more file types that are particularly useful to each feature that is created (using hooks). What is the best way to get those files to show up as tabs in the CodeEditor tabs alongside code/style/test/etc?

I have no concerns over forking the project in order to adjust the program to my needs, but have as of yet had some difficulty in the attempt, are there any guides for developing the editor locally?

Thank you in advance!

conarwelsh avatar Jun 23 '18 19:06 conarwelsh

Thanks @conarwelsh , maybe you are the first guy deep diving into Rekit plugin:-)

  1. I've published a new [email protected] to pass rekitCore to plugin install.js
  2. Rekit Studio has not provided plugin mechanism but I'm just working on it since I also has this requirement. But it may take several months...
  3. What's your difficulty to run Rekit Studio locally? Sorry these has been no document about it...

supnate avatar Jun 24 '18 04:06 supnate

Apologies for the very long delay in a response! I recently moved to Europe from the US so there has been a lot of time spent settling in.

I will look through your updates, which I thank you for. Also I will see if I can get a detailed account of what goes wrong when I try to install the local development version.

What I am trying to accomplish is simple... basically every project I build has an Apollo Server running a GraphQL endpoint. The actual server is very straightforward out of the box and works for most of my implementations as is (I only say most to be careful, when in reality it is probably 100%). Really the only things that need to be customized for the server are the resolvers|database model|type definitions which are all feature-specific. So I built a Rekit plugin to simply hook into a feature creation, and also provide basic stubs for those files inside the new feature folder. Also upon installation of the plugin it installs the core-server stub file. This is AMAZING!!! I cannot even begin to tell you how much time and effort is saved by this, as well as creating very much cleaner code overall. It is one of the more exciting developments my workflow has seen in some time! If I could get those extra tabs to show up, and figure out a solid way to integrate the server-side testing it would be 100% perfect!

conarwelsh avatar Jul 28 '18 16:07 conarwelsh

First problem with developing this locally is it is looking for a monaco instance installed somewhere outside of your code during a copy in webpack.config.js

      new CopyWebpackPlugin([
        {
          from: '../../../node_modules/monaco-editor/min/vs',
          to: 'vs',
        }
      ]),

Is there somewhere else you would like me to post this other than this thread?

conarwelsh avatar Aug 05 '18 16:08 conarwelsh

Thanks @conarwelsh , glad to know you can use Rekit plugin to save development effort!

I'm now working on refactoring Rekit to be a full plugin system. Then you can extend Rekit Studio UI like menus, tabs, dialogs, pages etc..

Also thanks for the information about local development of Rekit. There's not docs about how to run Rekit Studio locally yet, if you have time you can add a section like Contribution guide to README.md. That will be really appreciated!

supnate avatar Aug 06 '18 02:08 supnate