Skip to content

Latest commit

 

History

History
120 lines (104 loc) · 4.19 KB

CONTRIBUTING.md

File metadata and controls

120 lines (104 loc) · 4.19 KB

Contributing

This guide is for the people who are interested in contributing to DeskEngine. It is not a complete guide yet, but it should help you get started. If you have any questions or any suggestions, please open a issue.

Table of Contents

Prerequisites

To contribute to Consumet code, you need to knowledge of the following:

Cloning the repository

  1. Fork the repository
  2. Clone your fork to your local machine using the following command (make sure to change <your_username> to your GitHub username):
git clone https://github.com/<your-username>/DeskEngine.git
  1. Create a new branch:
git checkout -b <new-branch-name>

Project structure

I believe that project structure is needed to make it simple to contribute to DeskEngine.

<plugins> is the directory of the plugins package with Deskengine. For example, Clock (no special characters).
<meters> is the directory of the api for the plugins. For example, DateTime.js (no special characters).\

> tree
main/
├── <meters>/
|   ├── ...
|   └── DateTime.js
├── mpv/
│   └── ... (advised to leave this alone it is a third party application for setting wallpapers)
├── weebp/
│   └── ... (advised to leave this alone it is a third party application for setting wallpapers)
├── app.js
├── config,ini
├── pluginManager.js
├── preload.js
├── wallpaperManager.js
│
public/
├── css/
|   ├── ...
|── images/
|   └── ...
├── js/
|   ├── config.ini
|   ├── dropdown.js
|   └── index.js
├── <plugins>/
|   └── ...
├── wallpapers/
|   └── ...
├── index.html
└── package.json

Writing a plugin

Each plugin becomes it own entity and is made up primarily of:

<PLUGINNAME>/index.html # the plugins main html file
<PLUGINNAME>/manifest.json # the plugin configuration file
<PLUGINNAME>/src/index.js # the renderer javascript for the html
<PLUGINNAME>/src/styles.css # the plugins styles

You are welcome to add anything to the the base application to allow an api for your plugin but any api must be located in the 'meters' folder. (For an example see DateTime.js for the Clock plugins api.).

Updating codebase

Updating documentation

  1. Update the documentation.
  2. Test your changes.
  3. Commit the changes.

Adding A Plugin

  1. Add the plugin code.
  2. Test your changes.
  3. Commit the changes.

Commit message

When you've made changes to one or more files, you have to commit that file. You also need a message for that commit.

You should read these guidelines, or that summarized:

  • Short and detailed
  • Prefix one of these commit types:
    • plugin: Adding new plugin, possibly improving an already existing plugin
    • feat: A feature, possibly improving something already existing
    • fix: A fix, for example of a bug
    • refactor: Refactoring a specific section of the codebase
    • test: Everything related to testing
    • docs: Everything related to documentation
    • chore: Code maintenance

Examples:

  • plugin: Adding new plugin - CPU Monitor
  • feat: Speed up parsing with new technique
  • fix: Fix Clock Plugin UI typo
  • refactor: Reformat code at app.js