Contributing

Thank you for your interest in contributing to lightGallery Desktop! This guide will help you get your development environment set up.

Development Setup

To work on the project, you'll need to clone the repository and install its dependencies.

  1. Clone the Repository

    git clone https://github.com/sachinchoolur/lightgallery-desktop.git
    cd lightgallery-desktop
  2. Install Dependencies

    The project uses npm for dependency management. The postinstall script automatically installs the app dependencies as well.

    npm install

Running the Application

To launch the application in a development environment with file watching and live reloading enabled, use the start script:

npm start

This command compiles the source code from app/ into the build/ directory and then launches the Electron application.

Running Tests

The project includes a simple test suite. To run the tests, use the following command:

npm test

This will start the application in test mode and run the spec files (e.g., app/hello_world/hello_world.spec.js).

Project Structure

Understanding the project's folder structure is key to contributing effectively.

  • app/: Contains all the source code for the Electron application, including JavaScript, HTML, LESS stylesheets, and the core lightgallery library files.
  • build/: This folder is where the compiled, runnable application code is placed after a build. This directory is what Electron actually runs.
  • config/: Contains environment-specific configuration files (development, test, production).
  • releases/: When you run npm run release, the final distributable installers (.dmg, .exe, .deb) are placed here.
  • resources/: Contains platform-specific resources and templates used for creating the installers, such as icons and configuration files (Info.plist for macOS, .nsi for Windows).
  • tasks/: Holds the Gulp scripts that automate the build, watch, and release processes.