An mirror from our Presences repository. https://github.com/PreMiD/Presences

Florian Metz 3be9513d75 docs: update README with comprehensive development guide (#9345) 3 päivää sitten
.github 3be9513d75 docs: update README with comprehensive development guide (#9345) 3 päivää sitten
.resources b7f56a2dee docs: change presence to activity (#9302) 1 viikko sitten
.vscode 239a48fad8 feat: modernize repo (#9184) 2 viikkoa sitten
@types 1d6f0d478b feat: add deprecation rule (#9278) 2 viikkoa sitten
cli 3be9513d75 docs: update README with comprehensive development guide (#9345) 3 päivää sitten
premid 1d6f0d478b feat: add deprecation rule (#9278) 2 viikkoa sitten
websites 5322c79422 fix(Twitch): make popup chat no longer show default status (#9344) 3 päivää sitten
.gitattributes 01ef2cf052 💚 Fixing CI 4 vuotta sitten
.gitignore 239a48fad8 feat: modernize repo (#9184) 2 viikkoa sitten
LICENSE 90aa44276d 🔄 Synced local 'LICENSE' with remote 'LICENSE' 3 vuotta sitten
README.md 3be9513d75 docs: update README with comprehensive development guide (#9345) 3 päivää sitten
commitlint.config.js 239a48fad8 feat: modernize repo (#9184) 2 viikkoa sitten
crowdin.yml 239a48fad8 feat: modernize repo (#9184) 2 viikkoa sitten
eslint.config.mjs 1d6f0d478b feat: add deprecation rule (#9278) 2 viikkoa sitten
package-lock.json af3deb10b3 chore(deps): update dependencies 1 viikko sitten
package.json 3be9513d75 docs: update README with comprehensive development guide (#9345) 3 päivää sitten
tsconfig.base.json 239a48fad8 feat: modernize repo (#9184) 2 viikkoa sitten

README.md

PreMiD Activities

This repository contains the source code of all Activities that are available in PreMiD's Store. Activities enhance your Discord presence by showing what you're doing on various websites.


Getting Started

Want to create your own Activity or modify an existing one? Great! Follow these simple steps:

  1. Set up your development environment

    • Install Node.js (version 20 or higher)
    • Clone this repository: git clone https://github.com/PreMiD/Activities.git
    • Navigate to the project directory: cd Activities
    • Install dependencies: npm install
  2. Learn the basics

    • Read our documentation to understand how Activities work
    • Browse through existing Activities to see examples and best practices
  3. Start creating/editing

    • Use our CLI tool as described below to create and develop your Activity

CLI Commands

The repository includes a command-line tool (pmd) to help you create and develop Activities easily.

Creating a New Activity

To create a new Activity with all the necessary files and structure:

npx pmd new my-activity-name

This will guide you through a setup process, asking for basic information to generate the Activity structure.

Developing an Activity

Once you've created an Activity, you can develop it with live-reload functionality:

npx pmd dev my-activity-name

This command will:

  • Start a development server
  • Watch for changes in your Activity files
  • Automatically rebuild when you make changes
  • Validate your Activity against PreMiD standards

Useful options:

  • --validate: Run additional validation checks for metadata, images, etc.

Testing Your Activity

To test your Activity:

  1. Install the PreMiD Extension in your browser
  2. Enable "Activity Developer Mode" in the extension settings:
    • Click on the PreMiD extension icon in your browser
    • Go to settings (⚙️)
    • Enable "Activity Developer Mode"
  3. Run the development command: bash npx pmd dev my-activity-name
  4. The pmd tool will automatically send your Activity to the extension while in development mode
  5. Navigate to the website your Activity supports to see it in action
  6. Changes you make will be automatically picked up and sent to the extension

This development workflow allows you to see your changes in real-time without having to manually load the Activity each time you make a change.

Submitting Your Activity

When your Activity is ready:

  1. Make sure it passes all validation checks
  2. Create a Pull Request to this repository
  3. Wait for a review from our maintainers

Committing

This repository strictly enforces the use of commitlint. For more information read the Commit Convention guide