Skip to content

Commit a7625fd

Browse files
committed
feat: Initial commit
0 parents  commit a7625fd

34 files changed

+6824
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Report bug(s) encountered with the plugin!
4+
title: "[Bug]"
5+
labels: bug
6+
7+
---
8+
9+
**Bug Description**
10+
Provide a clear and concise description of the bug.
11+
12+
**Steps To Reproduce**
13+
Steps to reproduce the bug behavior:
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
**Expected behavior**
20+
Describe the behavior that is expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Desktop (please complete the following information):**
26+
- OS: [e.g. iOS]
27+
- Browser: [e.g. chrome, safari]
28+
29+
**Mobile (please complete the following information):**
30+
- Device: [e.g. iPhone12]
31+
- OS: [e.g. iOS8.1]
32+
- Browser: [e.g. edge, firefox]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea to improve the plugin!
4+
title: "[Feat]"
5+
labels: enhancement
6+
7+
---
8+
9+
**Is your feature request related to a problem? Please describe:**
10+
A clear and concise description of what the problem is. (e.g. I'm always frustrated when [...])
11+
12+
**Describe the solution you'd like:**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered:**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/help.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Help
3+
about: Seek help for using the plugin!
4+
title: "[Help]"
5+
labels: help wanted
6+
7+
---
8+
9+
**Help Description**
10+
Provide a clear and concise description on the help you need (include screenshots if relevant).
11+
12+
**Additional context**
13+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/task.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Task
3+
about: Create a task to track work to be done for the plugin!
4+
title: "[Task]"
5+
6+
---
7+
8+
**Task Description**
9+
Provide a clear and concise description of the task (e.g. add github actions for linting).
10+
11+
**Deliverable(s)**
12+
State the expected deliverable(s) for this task (e.g. lint.yml file, configured for linting in github actions).
13+
14+
**Additional Context**
15+
Add any other context about the task here.

.github/pull_request_template.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#### Description
2+
3+
Please include a brief summary of the change and include the relevant issue(s).
4+
5+
Closes #(issue)
6+
7+
#### What change does this PR introduce?
8+
9+
Please select the relevant option(s).
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update (changes to docs/code comments)
15+
16+
#### What is the proposed approach?
17+
18+
Please give a short overview/explanation on the approach taken to resolve the issue(s).
19+
20+
#### Checklist:
21+
22+
- [ ] The commit message follows our adopted [guidelines](https://www.conventionalcommits.org/en/v1.0.0/)
23+
- [ ] Testing has been done for the change(s) added (for bug fixes/features)
24+
- [ ] Relevant comments/docs have been added/updated (for bug fixes/features)

.github/workflows/ci-cd-pipeline.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI/CD Status
2+
run-name: Full CI/CD Pipeline
3+
4+
on:
5+
push:
6+
branches: ["main"]
7+
paths-ignore:
8+
- "*.md" # ignore all html files at root
9+
- "*.js" # ignore all js files at root
10+
- "*.ts" # ignore all ts files at root
11+
- ".github/**/*.md" # ignore html files for .github
12+
- ".eslintrc" # ignore eslint changes
13+
- ".gitignore" # ignore git ignore changes
14+
pull_request:
15+
branches: ["main"]
16+
paths-ignore:
17+
- "*.md" # ignore all html files at root
18+
- "*.js" # ignore all js files at root
19+
- "*.ts" # ignore all ts files at root
20+
- ".github/**/*.md" # ignore html files for .github
21+
- ".eslintrc" # ignore eslint changes
22+
- ".gitignore" # ignore git ignore changes
23+
workflow_dispatch:
24+
25+
jobs:
26+
trigger-full-ci:
27+
name: CI
28+
uses: ./.github/workflows/lint-and-build.yml
29+
with:
30+
node-version: "22.4.1"

.github/workflows/lint-and-build.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Lint & Build
2+
run-name: Lint & Build
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
node-version:
8+
description: "Node.js version to use"
9+
required: true
10+
type: string
11+
12+
jobs:
13+
lint:
14+
name: Run Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js (Latest)
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "22.4.1"
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Run Linter
29+
run: npm run lint
30+
31+
build:
32+
needs: lint
33+
name: Run Build Process
34+
runs-on: ubuntu-latest
35+
36+
strategy:
37+
matrix:
38+
node-version: [18.x, 20.x, 22.x]
39+
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Setup Node.js ${{ matrix.node-version }}
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: ${{ matrix.node-version }}
48+
49+
- name: Install Dependencies
50+
run: npm ci
51+
52+
- name: Build Project
53+
run: npm run build --if-present
+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Publish Releases
2+
run-name: Publish Releases
3+
4+
permissions:
5+
contents: write
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
publish_to_github:
11+
description: 'Publish to GitHub Release'
12+
required: false
13+
default: 'false'
14+
type: boolean
15+
publish_to_npm:
16+
description: 'Publish to npm'
17+
required: false
18+
default: 'false'
19+
type: boolean
20+
github_tag:
21+
description: 'Release tag for GitHub (e.g., v1.0.0)'
22+
required: false
23+
type: string
24+
github_release_notes:
25+
description: 'Release notes for GitHub'
26+
required: false
27+
type: string
28+
npm_version:
29+
description: 'npm package version (e.g., 1.0.0)'
30+
required: false
31+
type: string
32+
npm_release_notes:
33+
description: 'Release notes for npm'
34+
required: false
35+
type: string
36+
37+
jobs:
38+
publish_github_release:
39+
name: Publish to GitHub Release
40+
if: ${{ github.event.inputs.publish_to_github == 'true' }}
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
46+
- name: Setup Node.js
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: "22.4.1"
50+
51+
- name: Install Dependencies
52+
run: npm ci
53+
54+
- name: Create GitHub Release
55+
id: create_release
56+
uses: actions/[email protected]
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
with:
60+
tag_name: ${{ github.event.inputs.github_tag }}
61+
release_name: Release ${{ github.event.inputs.github_tag }}
62+
body: ${{ github.event.inputs.github_release_notes }}
63+
draft: false
64+
prerelease: false
65+
66+
- name: Package Plugin
67+
id: package_plugin
68+
run: |
69+
npm pack
70+
echo "PACKAGE_NAME=$(ls *.tgz)" >> $GITHUB_ENV
71+
72+
- name: Upload Release Asset
73+
if: ${{ github.event.inputs.github_tag }}
74+
uses: actions/[email protected]
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
with:
78+
upload_url: ${{ steps.create_release.outputs.upload_url }}
79+
asset_path: ${{ env.PACKAGE_NAME }}
80+
asset_name: ${{ env.PACKAGE_NAME }}
81+
asset_content_type: application/gzip
82+
83+
publish_npm_release:
84+
name: Publish to npm
85+
if: ${{ github.event.inputs.publish_to_npm == 'true' }}
86+
runs-on: ubuntu-latest
87+
steps:
88+
- name: Checkout code
89+
uses: actions/checkout@v4
90+
91+
- name: Setup Node.js
92+
uses: actions/setup-node@v4
93+
with:
94+
node-version: "22.4.1"
95+
96+
- name: Install Dependencies
97+
run: npm ci
98+
99+
- name: Build Project
100+
run: npm run build --if-present
101+
102+
- name: Update package version
103+
if: ${{ github.event.inputs.npm_version }}
104+
run: |
105+
npm version ${{ github.event.inputs.npm_version }} --no-git-tag-version
106+
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
107+
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
108+
git add package.json
109+
git commit -m "chore: release version ${{ github.event.inputs.npm_version }}"
110+
git push
111+
112+
- name: Publish to npm
113+
run: npm publish
114+
env:
115+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# production
9+
/build
10+
/dist
11+
*.tgz
12+
13+
# misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
.eslintcache
20+
.setup_completed
21+
22+
# logs
23+
logs
24+
*.log
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
pnpm-debug.log*
29+
lerna-debug.log*
30+
31+
# editors
32+
.vscode/*
33+
!.vscode/extensions.json
34+
.idea
35+
*.suo
36+
*.ntvs*
37+
*.njsproj
38+
*.sln
39+
*.sw?

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## v0.1.0 (18-02-2025)
2+
3+
**Added:**
4+
- Initial Release

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Tan Jin (tjtanjin)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)