Skip to content

Commit 937de40

Browse files
authored
Merge branch 'main' into development
2 parents 1075583 + a41dcb0 commit 937de40

File tree

276 files changed

+10075
-6547
lines changed

Some content is hidden

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

276 files changed

+10075
-6547
lines changed

.all-contributorsrc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,64 @@
11141114
"contributions": [
11151115
"doc"
11161116
]
1117+
},
1118+
{
1119+
"login": "tundiszasz",
1120+
"name": "Tündi Szász",
1121+
"avatar_url": "https://avatars3.githubusercontent.com/u/19189730?v=4",
1122+
"profile": "http://www.tundiszasz.com",
1123+
"contributions": [
1124+
"design",
1125+
"ideas"
1126+
]
1127+
},
1128+
{
1129+
"login": "hellonun",
1130+
"name": "hellonun",
1131+
"avatar_url": "https://avatars0.githubusercontent.com/u/43077909?v=4",
1132+
"profile": "https://github.com/hellonun",
1133+
"contributions": [
1134+
"ideas",
1135+
"userTesting"
1136+
]
1137+
},
1138+
{
1139+
"login": "pgrimaud",
1140+
"name": "Pierre Grimaud",
1141+
"avatar_url": "https://avatars1.githubusercontent.com/u/1866496?v=4",
1142+
"profile": "https://github.com/pgrimaud",
1143+
"contributions": [
1144+
"doc",
1145+
"content"
1146+
]
1147+
},
1148+
{
1149+
"login": "GregFrench",
1150+
"name": "Greg French",
1151+
"avatar_url": "https://avatars0.githubusercontent.com/u/17938510?v=4",
1152+
"profile": "http://www.gregfrench.net/",
1153+
"contributions": [
1154+
"bug"
1155+
]
1156+
},
1157+
{
1158+
"login": "dalequark",
1159+
"name": "Dale Markowitz",
1160+
"avatar_url": "https://avatars1.githubusercontent.com/u/2328571?v=4",
1161+
"profile": "https://daleonai.com",
1162+
"contributions": [
1163+
"code",
1164+
"ideas"
1165+
]
1166+
},
1167+
{
1168+
"login": "RaglandCodes",
1169+
"name": "Ragland Asir",
1170+
"avatar_url": "https://avatars3.githubusercontent.com/u/39048764?v=4",
1171+
"profile": "http://raglandcodes.github.io",
1172+
"contributions": [
1173+
"doc"
1174+
]
11171175
}
11181176
],
11191177
"contributorsPerLine": 7,

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
dist_examples
3+
**/lib
4+

.eslintrc.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
const p5Globals = require("./p5Globals");
2+
const p5SoundGlobals = require("./p5SoundGlobals");
3+
4+
module.exports = {
5+
extends: ["airbnb-base", "prettier"],
6+
globals: {
7+
fetch: false,
8+
document: true,
9+
},
10+
rules: {
11+
"no-console": 0,
12+
},
13+
env: {
14+
browser: true,
15+
jasmine: true,
16+
},
17+
overrides: [
18+
{
19+
files: ["examples/**"],
20+
globals: {
21+
ml5: false,
22+
p5: false,
23+
...p5Globals,
24+
...p5SoundGlobals,
25+
},
26+
rules: {
27+
"no-use-before-define": [
28+
"error",
29+
{
30+
functions: false,
31+
classes: true,
32+
variables: true,
33+
},
34+
],
35+
"no-unused-vars": ["error", { varsIgnorePattern: "^setup$|^draw$|^preload$" }],
36+
"new-cap": 0,
37+
"no-underscore-dangle": 0,
38+
},
39+
},
40+
{
41+
files: ["**/**_test.js"],
42+
globals: {
43+
ml5: false,
44+
},
45+
},
46+
],
47+
};

.eslintrc.json

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

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ I'm submitting a new issue. Please see the details below.
2020

2121

2222
### → Step 3: Share an example of the issue 🦄
23-
> Here's some example code or a demonstration of my feature in this issue, separe GitHub repo, or in the https://editor.p5js.org or codepen/jsfiddle/Glitch/etc...
23+
> Here's some example code or a demonstration of my feature in this issue, separate GitHub repo, or in the https://editor.p5js.org or codepen/jsfiddle/Glitch/etc...
2424
2525

2626

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ I'm making a Pull Request(PR). Please see the details below.
99

1010
**A good PR 🌟**
1111

12-
### → Step 1: Which branch are you submitting to? 🌲
13-
> Development (for new features or updates), Release (for bug fixes), or ___________?
14-
15-
16-
17-
### → Step 2: Describe your Pull Request 📝
12+
### → Step 1: Describe your Pull Request 📝
1813
> Fixing a Bug? Adding an Update? Submitting a New Feature? Does it introduce a breaking change?
1914
2015

@@ -23,15 +18,15 @@ I'm making a Pull Request(PR). Please see the details below.
2318

2419
**A great PR 🌟🌟**
2520

26-
### → Step 3: Share a Relevant Example 🦄
21+
### → Step 2: Share a Relevant Example 🦄
2722
> Here's some example code or a demonstration of my feature as a part of this pull request, a separate pull request, in the https://editor.p5js.org, or codepen/jsfiddle/etc...
2823
2924

3025

3126

3227
**The best PR 🌟🌟🌟**
3328

34-
### → Step 4: Screenshots or Relevant Documentation 🖼
29+
### → Step 3: Screenshots or Relevant Documentation 🖼
3530
> Here's some helpful screenshots and/or documentation of the new feature
3631
3732

.github/workflows/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: reviewdog
2+
on: [pull_request]
3+
jobs:
4+
eslint:
5+
name: runner / eslint
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
- name: eslint
10+
uses: reviewdog/action-eslint@v1
11+
with:
12+
github_token: ${{ secrets.github_token }}
13+
reporter: github-pr-review # Change reporter.

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: node_js
22
node_js:
3-
- "8"
4-
- "10"
3+
- "12"
54
git:
65
depth: 5
76
script:

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ We like these hashtags: #noCodeSnobs (because we value community over efficiency
4141

4242
Our community is always looking for enthusiasts to help in all different ways.
4343

44-
- **Develop**. [GitHub](https://github.com/ml5js/ml5-library) is the main place where code is collected, issues are documented, and discussions about code are had. Check out the [contributing documentation to get started](https://github.com/ml5js/ml5-library/blob/development/CONTRIBUTING.md) with developing the library.
44+
- **Develop**. [GitHub](https://github.com/ml5js/ml5-library) is the main place where code is collected, issues are documented, and discussions about code are had. Check out the [contributing documentation to get started](https://github.com/ml5js/ml5-library/blob/main/CONTRIBUTING.md) with developing the library.
4545
- **Document**. Everyone loves documentation. Help is needed porting examples, and adding documentation, and creating tutorials.
4646
- **Teach**. Teach a workshop, a class, a friend, a collaborator! Tag [@ml5js on Twitter](https://twitter.com/ml5js?lang=en) and we will do our best to share what you're doing.
4747
- **Create**. ml5.js is looking for designers, artists, coders, programmers to bring your creative and amazing work to show and inspire other people. Submit your work to [email protected].

CONTRIBUTING.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
44
![friendly machine learning for the web](assets/header.png)
55

6-
## The ml5 ecosystem (last updated: 22, March 2019)
6+
## The ml5 ecosystem (last updated: 24, May 2020)
77

88
ml5.js is comprised a number of sister repositories which you can find at the [ml5 github organization - github.com/ml5js](https://github.com/ml5js). As a contributor of ml5 you should be aware of the other parallel repositories of the ml5 project.
99

10-
- **The 3 main repositories you'll likely be working with**:
10+
- **The 2 main repositories you'll likely be working with**:
1111
+ [ml5-library]([https://github.com/ml5js](https://github.com/ml5js/ml5-library))
1212
* this is the main ml5js library. When building the library, all of the files in the `/src` directory get bundled into the `ml5.js` library. Releases to the ml5 library get sent to `npm` and are hosted at https://unpkg.com/ (e.g. `https://unpkg.com/[email protected]/dist/ml5.min.js`). When adding new features or updates to the ml5 library, you should also add an example in the `examples/` subdirectory of this repo to showcase how your new feature works. Usually examples are submitted in a simple p5.js sketch, but they can also be in vanilla javascript.
1313
+ [ml5-website](https://github.com/ml5js/ml5-website)
@@ -37,8 +37,8 @@ Preamble: If you're interested in to contribute to the ml5 project, just know yo
3737
3. you make a comment on an existing issue or post your issue and indicate that you're curious to do your best to solve it 🔬
3838
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `fix-detection-results`
3939
5. you jam on fixing the bug, commit your changes with meaningful commit messages, and push your changes to your bug fix branch (e.g. `fix-detection-results`)
40-
6. when ready, make a pull request to the `release` branch or `development` branch of ml5-library. Submit to the `release` branch if the bug you found was in the current ml5 release - the version of ml5 which is on npm. Submit to the `development` branch if the bug you found was in `development` branch of ml5-library.
41-
7. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, your changes will be merged in. 🎉
40+
6. when ready, make a pull request to the `main` branch of ml5-library. Prepend "[NEEDS RELEASE]" to the title if the bug you found was in the current ml5 release - the version of ml5 which is on npm.
41+
7. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, a `ready for release` label will be added to your PR and your changes will be merged in and release with the next public update to the library. 🎉
4242
8. hi-fives 👏 and hugs 🤗
4343

4444
### For new features or feature additions/updates
@@ -48,7 +48,7 @@ Preamble: If you're interested in to contribute to the ml5 project, just know yo
4848
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `new-generative-model-x`
4949
5. you jam on your new feature, commit your changes with meaningful commit messages, and push your changes to your new feature branch (e.g. `new-generative-model-x`)
5050
6. you should also add an example of your new feature to the `examples/` directory so that other people can learn how to use your new feature.
51-
7. when ready, make a pull request to the `development` branch of ml5-library. Submit to the `development` since your feature is part of the new frontier of the ml5-library. Important is step 7 below.
51+
7. when ready, make a pull request to the `main` branch of ml5-library.
5252
8. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, your changes will be merged in. 🎉
5353
9. hi-fives 👏 and hugs 🤗
5454

@@ -168,21 +168,19 @@ NVM_HOMEBREW="/usr/local/opt/nvm/nvm.sh"
168168
npm run manual-test
169169
```
170170
171-
This creates a new folder called `/manual-test` in the project's root folder. Create an `index.html` file inside `/manual-test` and add the following:
171+
This creates a new folder called `/manual-test` in the project's root folder. The `/manual-test` folder contains an `index.html` file with the following content:
172172

173173
```html
174174
<!DOCTYPE html>
175175
<html>
176176
<head>
177-
<title>Test</title>
177+
<title>ml5.js manual test</title>
178178
<script src="http://localhost:8080/ml5.js"></script>
179179
</head>
180180
<body>
181-
182181
<script>
183-
182+
// Your scripts would be written here
184183
</script>
185-
186184
</body>
187185
</html>
188186
```
@@ -254,6 +252,8 @@ This last one is case sensitive!
254252

255253
## Making Releases (For the ml5 core team)
256254

255+
**NOTE: This section needs to be updated to align with the new `main` branch structure.**
256+
257257
Work in progress - we are working on making a few scripts to make it easier to make releases and deployments. For now, to address the long-winded process noted in https://github.com/ml5js/ml5-library/issues/387, we are experimenting with some devOps scripts.
258258

259259
In the instance you're ready to make a new release from `development` to `release`:
@@ -315,9 +315,9 @@ Go to Github and wait for tests to pass, then `squash and merge` the newly creat
315315
npm run publish:npm
316316
```
317317

318-
7. Enter your multi-factor auth when prompted where it says `OTP` (one time password): `your OTP code`
319-
8. Your new npm version should be released!
320-
9. Lastly, go to Github and document that new release with `release notes`.
318+
10. Enter your multi-factor auth when prompted where it says `OTP` (one time password): `your OTP code`
319+
11. Your new npm version should be released!
320+
12. Lastly, go to Github and document that new release with `release notes`.
321321

322322

323323
## Additional Resources

0 commit comments

Comments
 (0)