Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
davisshaver committed Dec 12, 2024
0 parents commit 0eb1788
Show file tree
Hide file tree
Showing 41 changed files with 2,713 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
};
59 changes: 59 additions & 0 deletions .github/workflows/generate-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Generate ZIP for Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build PHP
run: composer install --no-dev --optimize-autoloader

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install packages w/ Bun
run: bun install

- name: Build with Bun
run: bun run build

- name: Create release ZIP
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: 'wp-farcaster.zip'
exclusions: '/*node_modules/* composer.* readme.md package.json .eslintrc.js .nvmrc .stylelintrc.json phpcs.xml tsconfig.json bun.lockb .vscode/ .wordpress-org/ .wordpress-org/* src/ /*.git/* /*.github/*'

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: wp-farcaster
path: wp-farcaster.zip

- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: wp-farcaster.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Unzip folder for WP.org
uses: montudor/action-zip@v1
with:
args: unzip -qq wp-farcaster.zip -d wp-farcaster

- name: Upload plugin to WP.org
uses: 10up/[email protected]
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: wp-farcaster
BUILD_DIR: ./wp-farcaster
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Linting

on: [push]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build PHP
run: composer install --optimize-autoloader

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install packages w/ Bun
run: bun install

- name: Lint PHP
run: bun run lint:php

- name: Lint JS
run: bun run lint:js

- name: Validate types
run: bun run lint:ts

- name: Lint CSS
run: bun run lint:css

- name: Lint package.json
run: bun run lint:pkg-json

- name: Lint Markdown docs
run: bun run lint:md:docs
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Node modules
node_modules

# Composer packages
vendor

# Cache files
.phpcs/*.json
.phpunit.result.cache

# Build files
build

# Ignore temporary OS files
.DS_Store
.DS_Store?
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.thumbsdb
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": [ "@wordpress/stylelint-config/scss" ]
}
33 changes: 33 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"intelephense.files.exclude": [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/vendor/**/{Tests,tests}/**",
"**/.history/**",
"**/vendor/**/vendor/**",
"**/.cursor/**"
],
"phpsab.standard": "./phpcs.xml",
"phpsab.executablePathCS": "./vendor/bin/phpcs",
"phpsab.executablePathCBF": "./vendor/bin/phpcbf",
"phpsab.autoRulesetSearch": false,
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.validate": [ "css", "scss", "postcss" ],
"stylelint.config": null
}
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bun.lockb
Binary file not shown.
26 changes: 26 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "davisshaver/wp-farcaster",
"description": "WP Farcaster connects your WordPress site to Farcaster.",
"type": "wordpress-plugin",
"license": "GPL-3.0",
"require-dev": {
"automattic/vipwpcs": "^3.0",
"wp-coding-standards/wpcs": "^3.0",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"phpcompatibility/phpcompatibility-wp": "*"
},
"autoload": {
"classmap": [
"./includes"
]
},
"config": {
"platform": {
"php": "8.0"
},
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 0eb1788

Please sign in to comment.