Skip to content

Commit d592663

Browse files
authored
Merge pull request #4 from rtCamp/release/v1.0.0-beta
Chore: Initial commit
2 parents bafbb79 + b72b8d6 commit d592663

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+45557
-1
lines changed

.browserslistrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extends @wordpress/browserslist-config

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# WordPress Coding Standards
2+
# https://make.wordpress.org/core/handbook/coding-standards/
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
indent_style = tab
12+
13+
[{.babelrc,.eslintrc,.rtlcssrc,*.json,*.yml}]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[*.md]
18+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/*.min.js
2+
**/node_modules/**
3+
**/vendor/**
4+
build/*

.eslintrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"plugin:@wordpress/eslint-plugin/recommended-with-formatting",
5+
"plugin:import/recommended",
6+
"plugin:eslint-comments/recommended"
7+
],
8+
"plugins": [],
9+
"env": {
10+
"browser": true
11+
},
12+
"globals": {
13+
"_": true,
14+
"patternSyncData": true
15+
},
16+
"rules": {
17+
"jsdoc/check-indentation": "error",
18+
"no-shadow": "warn"
19+
},
20+
"overrides": [ {
21+
"files": [
22+
"**/__tests__/**/*.js",
23+
"**/test/*.js",
24+
"**/?(*.)test.js",
25+
"tests/js/**/*.js"
26+
],
27+
"extends": ["plugin:jest/all"],
28+
"rules": {
29+
// Add Rules for Jest here
30+
}
31+
} ]
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: "Bug Report"
3+
about: "If something isn't working as expected"
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## Bug Report
10+
11+
**Current Behavior**
12+
A clear and concise description of the buggy behavior.
13+
14+
**Expected behavior/code**
15+
A clear and concise description of what you expected to happen (or code).
16+
17+
**Steps to reproduce the bug**
18+
Steps to reproduce if any.
19+
20+
**Testing Environment (if applicable)**
21+
22+
- Browser used
23+
- OS: [e.g. OSX 10.15.x, Ubuntu 18.04]
24+
- Plugins used
25+
- ...
26+
27+
**Possible Solution**
28+
<!--- Only if you have suggestions on a fix for the bug -->
29+
30+
**Additional context/Screenshots**
31+
Add any other context about the problem here. If applicable, add screenshots to help explain.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: "Feature Request"
3+
about: "Suggest an idea for this project."
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## Feature Request
10+
11+
**Is your feature request related to a problem? Please describe.**
12+
A clear and concise description of what the problem is. Ex. I have an issue when [...]
13+
14+
**Describe the solution you'd like**
15+
A clear and concise description of what you want to happen. Add any considered drawbacks.
16+
17+
**Describe alternatives you've considered**
18+
A clear and concise description of any alternative solutions or features you've considered.
19+
20+
**Documentation, Adoption, Migration Strategy (if applicable)**
21+
If you can, explain how users will be able to use this and possibly write out a version of the docs.
22+
Maybe a screenshot or design?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!--
2+
Thanks for taking the time to submit a Pull Request.
3+
Please make sure to review the [Development Guidelines](../docs/DEVELOPMENT.md) before submitting your PR.
4+
-->
5+
6+
## What
7+
<!-- In a few words, what does this PR actually change -->
8+
9+
10+
## Why
11+
<!-- Why is this PR necessary? Please any existing previous issue(s) or PR(s) and include a short summary here, too. -->
12+
13+
14+
### Related Issue(s):
15+
<!-- E.g.
16+
- Fixes | Closes | Part of: #123
17+
-->
18+
19+
20+
## How
21+
<!-- How does your PR address the issue at hand? What are the implementation details? Please be specific. -->
22+
23+
24+
## Testing Instructions
25+
<!-- Please include step by step instructions on how to test this PR. -->
26+
<!-- 1. Open a Post or Page. -->
27+
<!-- 2. Insert a Heading Block. -->
28+
<!-- 3. etc. -->
29+
30+
31+
## Screenshots
32+
<!-- Include relevant screenshots proving the PR works as intended. -->
33+
34+
35+
## Additional Info
36+
<!-- Please include any relevant logs, error output, etc -->
37+
38+
39+
## Checklist
40+
<!--
41+
We encourage you to complete this checklist to the best of your abilities.
42+
If you can't do everything, that's okay too.
43+
[Development Guidelines](../docs/DEVELOPMENT.md)
44+
-->
45+
46+
- [ ] I have read the [Contribution Guidelines](https://github.com/rtCamp/OneDesign/blob/main/docs/CONTRIBUTING.md).
47+
- [ ] I have read the [Development Guidelines](https://github.com/rtCamp/OneDesign/blob/main/docs/DEVELOPMENT.md).
48+
- [ ] My code is tested to the best of my abilities.
49+
- [ ] My code passes all lints (ESLint etc.).
50+
- [ ] My code has detailed inline documentation.
51+
- [ ] I have updated the project documentation as needed.
52+
- [ ] I have added a changeset for this PR using `npm run changeset`.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Inspections
2+
on: pull_request
3+
4+
jobs:
5+
runPHPCSInspection:
6+
name: Run PHPCS inspection
7+
runs-on: self-hosted
8+
container:
9+
image: ubuntu:latest
10+
11+
steps:
12+
- name: Install Dependencies
13+
run: |
14+
apt-get update
15+
apt-get install -y git sudo
16+
17+
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.pull_request.head.sha }}
20+
21+
- name: Run PHPCS inspection
22+
uses: rtCamp/action-phpcs-code-review@master
23+
env:
24+
SKIP_FOLDERS: "tests,.github"
25+
GH_BOT_TOKEN: ${{ secrets.RTBOT_TOKEN }}
26+
PHPCS_SNIFFS_EXCLUDE: "WordPress.Files.FileName"
27+
with:
28+
args: WordPress,WordPress-Core,WordPress-Docs
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Publish Plugin to Github Releases
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
release:
9+
runs-on: self-hosted
10+
container:
11+
image: ubuntu:latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install system dependencies
16+
shell: bash
17+
run: |
18+
apt-get update
19+
apt-get install -y zip unzip composer
20+
21+
- name: Set up Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version-file: '.nvmrc'
25+
26+
- name: Install dependencies
27+
shell: bash
28+
run: |
29+
composer install --no-dev
30+
npm i
31+
32+
- name: Build Library
33+
shell: bash
34+
run: npm run build:prod
35+
36+
- name: Create WordPress Plugin Zip
37+
id: create-zip
38+
shell: bash
39+
run: |
40+
# Create a temporary directory for the plugin
41+
mkdir -p /tmp/onedesign/assets/build
42+
43+
# Copy necessary files to the plugin directory
44+
cp -r assets/build /tmp/onedesign/assets/
45+
cp composer.json /tmp/onedesign/
46+
cp -r inc/ /tmp/onedesign/
47+
cp onedesign.php /tmp/onedesign/
48+
cp README.md /tmp/onedesign/
49+
cp -r vendor/ /tmp/onedesign/
50+
51+
# Create the zip file
52+
cd /tmp
53+
zip -r onedesign.zip onedesign/ -x "*.git*" "*.DS_Store*" "*node_modules*" "*tests*" "*test*"
54+
55+
# Move zip to workspace
56+
mv onedesign.zip $GITHUB_WORKSPACE/
57+
58+
# Set output for the zip path
59+
echo "zip-path=$GITHUB_WORKSPACE/onedesign.zip" >> $GITHUB_OUTPUT
60+
61+
# Display zip contents for verification
62+
echo "=== Plugin zip contents ==="
63+
unzip -l $GITHUB_WORKSPACE/onedesign.zip
64+
65+
- name: Upload Release Artifact
66+
if: startsWith(github.ref, 'refs/tags/dry') == false && github.ref != 'refs/heads/develop'
67+
uses: softprops/[email protected]
68+
with:
69+
files: |
70+
${{ steps.create-zip.outputs.zip-path }}
71+
token: '${{ github.token }}'
72+
tag_name: ${{ github.ref_name }}
73+
draft: true
74+
generate_release_notes: true
75+
name: OneDesign ${{ github.ref_name }}

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Core
2+
/wordpress/
3+
4+
# macOS/IDE
5+
.DS_Store
6+
.idea
7+
8+
# Log files
9+
*.log
10+
/tests/logs
11+
12+
# Packages
13+
/node_modules/
14+
/vendor/
15+
16+
# Enviroment
17+
.env
18+
.wp-env.override.json
19+
20+
# PHPCS
21+
phpcs.xml
22+
23+
# Cache
24+
.phpunit.result.cache
25+
26+
# Build
27+
/assets/build/

0 commit comments

Comments
 (0)