Skip to content

Commit 5fcde45

Browse files
Merge branch 'dev-2.0' into 7618
2 parents d070e0c + 6c6ac6c commit 5fcde45

File tree

210 files changed

+26951
-12514
lines changed

Some content is hidden

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

210 files changed

+26951
-12514
lines changed

.all-contributorsrc

Lines changed: 613 additions & 30 deletions
Large diffs are not rendered by default.

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/config.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,26 @@
44

55
# Comment to be posted to on first time issues
66
newIssueWelcomeComment: >
7-
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
8-
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
7+
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms.
8+
9+
For guidance on contributing, check out our [contributing guidelines](https://github.com/processing/p5.js/blob/main/CONTRIBUTING.md) and other [resources for contributors](https://p5js.org/contribute/).
10+
11+
💬 If you have questions or need support, feel free to join the [Processing Foundation Forum](https://discourse.processing.org/) or visit our [Community page](https://p5js.org/community/).
912
13+
📜 Please also review our [Code of Conduct](https://p5js.org/code-of-conduct/) to understand our community standards.
14+
15+
Thank You!
16+
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
1017
# Comment to be posted to on PRs from first time contributors in your repository
1118
newPRWelcomeComment: >
12-
🎉 Thanks for opening this pull request! Please check out our [contributing guidelines](https://github.com/processing/p5.js/blob/main/CONTRIBUTING.md) if you haven't already. And be sure to add yourself to the [list of contributors on the readme page](https://github.com/processing/p5.js#contributors)!
19+
🎉 Thanks for opening this pull request! For guidance on contributing, check out our [contributor guidelines](https://p5js.org/contribute/contributor_guidelines/) and other [resources for contributors](https://p5js.org/contribute)!
20+
21+
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
22+
23+
🌸 Once your PR is merged, be sure to [add yourself](https://github.com/processing/p5.js/issues/2309) to the [list of contributors on the readme page](https://github.com/processing/p5.js#contributors) !
24+
25+
26+
Thank You!
1327
1428
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
1529

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Close Linked Issues on PR Merge
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- dev-2.0
8+
9+
jobs:
10+
close_issues:
11+
if: github.event.pull_request.merged == true
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Close linked issues on non-default branches
15+
uses: processing/branch-pr-close-issue@v1
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
branch: dev-2.0
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: New p5.js 2.x release
2+
# Requires secrets `NPM_TOKEN` and `ACCESS_TOKEN` to be set
3+
4+
permissions:
5+
contents: write
6+
7+
on:
8+
push:
9+
tags:
10+
- 'v2.*.*' # Push events to matching v*.*.*, i.e. v20.15.10
11+
- 'v2.*.*-*' # Push events to matching v*.*.*-*, i.e. v20.15.10-0
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
name: Release
17+
env:
18+
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
steps:
20+
# 1. Setup
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 20
25+
- name: Get semver info
26+
id: semver
27+
uses: akshens/semver-tag@v4
28+
with:
29+
version: ${{ github.ref_name }}
30+
31+
- name: Get version number
32+
id: version-number
33+
run: |
34+
version=$(echo ${{ github.ref_name }} | cut -c 2-)
35+
echo "version=$version" >> $GITHUB_OUTPUT
36+
37+
- name: Get current date
38+
id: date
39+
run: echo "date=$(date +"%B %Oe, %Y")" >> $GITHUB_OUTPUT
40+
- name: Install dependencies
41+
run: npm ci
42+
env:
43+
CI: true
44+
- name: Run test
45+
run: npm test
46+
env:
47+
CI: true
48+
- name: Run build
49+
run: npm run build
50+
- name: Generate types
51+
run: npm run generate-types
52+
53+
# 2. Prepare release files
54+
- run: mkdir release && mkdir p5 && cp -r ./lib/* p5/
55+
- name: Create release zip file
56+
uses: TheDoctor0/zip-release@0.6.2
57+
with:
58+
type: zip
59+
filename: release/p5.zip
60+
path: ./p5/*
61+
62+
- name: Copy release files
63+
run: cp lib/p5.js lib/p5.min.js lib/p5.esm.js release/
64+
65+
# 3. Release p5.js
66+
- name: Create GitHub release
67+
uses: softprops/action-gh-release@v0.1.15
68+
with:
69+
draft: true
70+
prerelease: ${{ steps.semver.outputs.is-prerelease == 'true' }}
71+
files: release/*
72+
generate_release_notes: true
73+
token: ${{ secrets.ACCESS_TOKEN }}
74+
- name: Publish to NPM
75+
uses: JS-DevTools/npm-publish@v1
76+
with:
77+
token: ${{ secrets.NPM_TOKEN }}
78+
tag: ${{ steps.semver.outputs.is-prerelease != 'true' && 'latest' || 'beta' }}
79+
80+
# 4. Update p5.js website
81+
- name: Clone p5.js website
82+
if: ${{ steps.semver.outputs.is-prerelease != 'true' }}
83+
uses: actions/checkout@v3
84+
with:
85+
repository: processing/p5.js-website
86+
ref: '2.0'
87+
path: website
88+
fetch-depth: 0
89+
token: ${{ secrets.ACCESS_TOKEN }}
90+
- name: Updated website files
91+
if: ${{ steps.semver.outputs.is-prerelease != 'true' }}
92+
run: |
93+
cd website
94+
npm install
95+
npm run build:p5-version
96+
npm run build:contributor-docs
97+
npm run build:contributors
98+
npm run build:reference
99+
npm run build:search
100+
- name: Commit updated website files
101+
if: ${{ steps.semver.outputs.is-prerelease != 'true' }}
102+
run: |
103+
cd website
104+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
105+
git config --local user.name "github-actions[bot]"
106+
git add .
107+
git commit -m "Update p5.js to ${{ github.ref_name }}"
108+
- name: Push updated website repo
109+
if: ${{ steps.semver.outputs.is-prerelease != 'true' }}
110+
uses: ad-m/github-push-action@v0.6.0
111+
with:
112+
github_token: ${{ secrets.ACCESS_TOKEN }}
113+
branch: '2.0'
114+
directory: website/
115+
repository: processing/p5.js-website

.github/workflows/release-workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ permissions:
77
on:
88
push:
99
tags:
10-
- 'v*.*.*' # Push events to matching v*.*.*, i.e. v20.15.10
11-
- 'v*.*.*-*' # Push events to matching v*.*.*-*, i.e. v20.15.10-0
10+
- 'v1.*.*' # Push events to matching v*.*.*, i.e. v20.15.10
11+
- 'v1.*.*-*' # Push events to matching v*.*.*-*, i.e. v20.15.10-0
1212

1313
jobs:
1414
release:
@@ -89,11 +89,11 @@ jobs:
8989
run: |
9090
cd website
9191
npm install
92+
npm run build:p5-version
9293
npm run build:contributor-docs
9394
npm run build:contributors
9495
npm run build:reference
9596
npm run build:search
96-
npm run build:p5-version
9797
- name: Commit updated website files
9898
if: ${{ steps.semver.outputs.is-prerelease != 'true' }}
9999
run: |

.gitignore

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
1-
*.DS_Store
2-
.project
1+
!*.gitkeep
2+
3+
.nyc_output/*
4+
# .vscode/settings.json
35
node_modules/*
6+
7+
analyzer/
8+
bower-repo/
9+
coverage/
10+
examples/3d/
411
experiments/*
12+
dist/
13+
docs/reference/*
14+
docs/data.json
515
lib_old/*
616
lib/p5.*
17+
lib/p5-test.js
718
lib/modules
8-
docs/reference/*
9-
!*.gitkeep
10-
examples/3d/
11-
.idea
12-
dist/
13-
*.d.ts
14-
p5.zip
15-
bower-repo/
1619
p5-website/
17-
.vscode/settings.json
18-
.nyc_output/*
19-
coverage/
20-
lib/p5-test.js
20+
preview/
2121
release/
22+
__screenshots__/
23+
24+
*.d.ts
25+
p5.zip
2226
yarn.lock
27+
2328
docs/data.json
2429
analyzer/
2530
preview/
2631
__screenshots__/
2732
actual-screenshots/
28-
visual-report.html
33+
visual-report.html
34+
35+
todo.md
36+
37+
*.DS_Store
38+
.idea
39+
.project
40+

.vscode/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"prettier.enable": false,
3+
"eslint.enable": true,
4+
"eslint.validate": [
5+
{ "language": "html", "autoFix": false },
6+
{ "language": "javascript", "autoFix": false },
7+
{ "language": "markdown", "autoFix": false },
8+
],
9+
"editor.defaultFormatter": null,
10+
"editor.formatOnSave": false,
11+
"editor.codeActionsOnSave": {},
12+
"javascript.format.enable": false
13+
}

0 commit comments

Comments
 (0)