Contributing

Contributions are welcome! If you want to build the plugin locally or contribute code, follow these steps.

Development Setup

  1. Clone the repository:

    git clone https://github.com/phibr0/obsidian-commander.git
    cd obsidian-commander

  2. Install dependencies:

    npm install

Build Scripts

The project uses npm scripts defined in package.json:

  • npm run dev: Starts the build process in watch mode. Useful for development.
  • npm run build: Builds the production version of main.js and styles.css using esbuild and tailwindcss.
  • npm run version: Bumps the version number.

Project Structure

  • src/main.ts: Entry point of the plugin.
  • src/manager/: Logic for handling different UI locations (Ribbon, Menu, etc.).
  • src/ui/: React/Preact components for the settings tab and modals.
  • src/styles/: SCSS and Tailwind CSS files.

Technologies

  • TypeScript: Main language.
  • Preact: Used for rendering the Settings UI.
  • TailwindCSS: Used for styling.
  • Esbuild: Used for bundling.

Translations

Translations are located in the locale/ folder. To add a language:

  1. Copy en.json.
  2. Rename it to your language code (e.g., de.json).
  3. Translate the values.
  4. Submit a Pull Request.