Skip to content

Commit

Permalink
[v1.0.0] Initial Replugged release
Browse files Browse the repository at this point in the history
  • Loading branch information
GriefMoDz committed Jan 4, 2023
1 parent f725811 commit 10d0bb5
Show file tree
Hide file tree
Showing 26 changed files with 3,063 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
@@ -0,0 +1,7 @@
root = true

[*]
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
57 changes: 57 additions & 0 deletions .eslintrc.yml
@@ -0,0 +1,57 @@
root: true
extends:
- eslint-config-dmitmel/presets/node
env:
browser: true
parser: "@typescript-eslint/parser"
parserOptions:
sourceType: module
plugins:
- "@typescript-eslint"
rules:
func-names: off
node/no-unsupported-features/es-syntax:
- error
- ignores:
- modules
- dynamicImport
node/no-unsupported-features/es-builtins:
- error
- ignores:
- globalThis
node/no-unsupported-features/node-builtins:
- error
- ignores:
- fs.promises

node/no-missing-require: off
node/no-missing-import: off
node/no-unpublished-import: off
node/no-unpublished-require: off
node/shebang: off
no-process-exit: off
no-undef: off
no-unused-vars: off
"@typescript-eslint/no-unused-vars": error

overrides:
- files: "**/*.ts"
extends: eslint-config-dmitmel/presets/typescript-addon
rules:
node/no-missing-import: off
eqeqeq: off
"@typescript-eslint/no-dynamic-delete": off
no-return-assign: off
no-void: off
consistent-return: off

- files: "**/src/**/*.ts"
extends: eslint-config-dmitmel/rules/typescript/with-type-checking

- files: "**/*.d.ts"
rules:
no-var: off

- files: "src/**/*.ts"
parserOptions:
project: tsconfig.json
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,33 @@
name: Lint

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14

- uses: pnpm/action-setup@v2
with:
version: latest

- name: Install Node.js dependencies
run: pnpm install

- name: Run linters
run: pnpm run lint
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14

- uses: pnpm/action-setup@v2
with:
version: latest

- name: Install Node.js dependencies
run: pnpm install

- name: Build TypeScript and bundle into asar
run: pnpm run build-and-bundle

- uses: ncipollo/release-action@v1
with:
artifacts: "*.asar"
makeLatest: true
106 changes: 106 additions & 0 deletions .gitignore
@@ -0,0 +1,106 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

/*.asar
14 changes: 14 additions & 0 deletions .prettierrc.json
@@ -0,0 +1,14 @@
{
"printWidth": 150,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "always",
"proseWrap": "always"
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode"
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,4 @@
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": false
}
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Harley
Copyright (c) 2019-2023 Harley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 16 additions & 2 deletions README.md
@@ -1,2 +1,16 @@
# online-friends-count
A Powercord plug-in that aims to bring back the good ol' nostalgic online friends count which used to be displayed in-between the home icon and servers list.
# Statistic Counter
Formally known as "Online Friends Count", this is a Replugged plug-in that has been ported from Powercord which introduces an interchangeable statistic counter in-between the home button and servers list.

## Features

- Multiple counters (i.e. number of friends online, total number of friends, incoming friend requests, blocked users, and total number of servers joined).
- Auto rotation with a customizable interval - useful for switching between counters without the need of clicking.

## Planned Features
[] Add a settings page
[] Implement a context menu to quickly change settings

## Previews

### Counter
<img alt="Counter" src="https://griefmodz.xyz/uploads/yog4NAGa6G.gif" width="150"/>
18 changes: 18 additions & 0 deletions manifest.json
@@ -0,0 +1,18 @@
{
"id": "xyz.griefmodz.StatisticCounter",
"name": "Statistic Counter",
"description": "A Replugged plug-in that has been ported from Powercord which introduces an interchangeable statistic counter in-between the home button and servers list.",
"author": {
"name": "M'Harley",
"discordID": "350227339784880130",
"github": "griefmodz"
},
"version": "1.0.0",
"updater": {
"type": "github",
"id": "griefmodz/statistic-counter"
},
"license": "OSL-3.0",
"type": "replugged-plugin",
"renderer": "src/index.tsx"
}
40 changes: 40 additions & 0 deletions package.json
@@ -0,0 +1,40 @@
{
"name": "statistic-counter",
"version": "1.0.0",
"description": "A Replugged plug-in that has been ported from Powercord which introduces an interchangeable statistic counter in-between the home button and servers list.",
"engines": {
"node": ">=14.0.0"
},
"scripts": {
"build": "tsx scripts/build.ts",
"watch": "tsx scripts/build.ts --watch",
"bundle": "tsx scripts/bundle.ts",
"build-and-bundle": "pnpm run build --no-install && pnpm run bundle",
"check": "tsc --noEmit",
"prettier:check": "prettier ./src ./scripts --check",
"eslint:check": "eslint ./src ./scripts",
"prettier:fix": "prettier ./src ./scripts --write",
"eslint:fix": "eslint ./src ./scripts --fix",
"lint": "pnpm run prettier:check && pnpm run eslint:check && pnpm run check",
"lint:fix": "pnpm run prettier:fix && pnpm run eslint:fix"
},
"keywords": [],
"author": "",
"license": "OSL-3.0",
"devDependencies": {
"@electron/asar": "^3.2.1",
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@types/node": "^18.11.2",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"esbuild": "^0.15.11",
"eslint": "^8.25.0",
"eslint-config-dmitmel": "github:dmitmel/eslint-config-dmitmel",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.31.10",
"prettier": "^2.8.1",
"replugged": "4.0.0-beta0.19",
"tsx": "^3.10.3",
"typescript": "^4.8.4"
}
}

0 comments on commit 10d0bb5

Please sign in to comment.