Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add p5.js to allow friendly error messages #45

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8eb6dd7
add p5.js to allow friendly error messages
schellenberg Aug 26, 2022
9d9e7b9
include .eslintrc.json file in template
schellenberg Aug 26, 2022
d3120f8
updated sketch.js template and readme
schellenberg Aug 29, 2022
c3e8fd5
Delete yarn.lock
schellenberg Aug 29, 2022
266c771
1.3.0
schellenberg Sep 1, 2022
e75c52c
testing library update
schellenberg Sep 1, 2022
1a47e5a
1.4.0
schellenberg Sep 1, 2022
28a1b71
update p5js to 1.5.0
schellenberg Oct 20, 2022
5114ea9
add deltaTime to eslint ignore
schellenberg Oct 20, 2022
c81a5e9
1.5.0
schellenberg Oct 20, 2022
c552806
updated jsconfig
schellenberg Jan 11, 2023
404d6d7
update p5 version
schellenberg Sep 6, 2023
7c867b8
1.6.0
schellenberg Sep 6, 2023
961a03b
updated p5js version
schellenberg Oct 31, 2023
4580565
updated build for vsce
schellenberg Oct 31, 2023
5699228
update p5js and p5play
schellenberg Nov 30, 2023
8d84196
package new vsce version
schellenberg Nov 30, 2023
374bd51
fix p5play links
schellenberg Nov 30, 2023
441f326
bump p5js version, and added python p5 fetch script
schellenberg Feb 29, 2024
1c81ae7
update p5js version
schellenberg May 27, 2024
d01aa14
update p5js version
schellenberg Aug 29, 2024
975c4fe
reorganize for eslint >= 9
schellenberg Oct 3, 2024
d15ae20
update eslint config
schellenberg Oct 4, 2024
4ef3011
updated template to use eslint config
schellenberg Oct 4, 2024
ca0fb32
removed double quotes on strings
schellenberg Oct 4, 2024
81fa401
added p5.serial
schellenberg Nov 1, 2024
42077e7
Update libraries.json
schellenberg Nov 1, 2024
c743a3c
updated p5js
schellenberg Nov 1, 2024
4de0fa8
updated eslint globals
schellenberg Nov 5, 2024
5fc570d
Update _note-to-self-on-building-publishing.txt
schellenberg Nov 5, 2024
cf89aba
bump version number
schellenberg Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "*"

[dev-packages]

[requires]
python_version = "3.10"
150 changes: 150 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# p5.vscode
# p5.vscode - CS30 Variant

This is a slightly adapted version of Sam Lavigne's p5.vscode extension. The relevant changes are:

- index.html file from the template links to the un-minified version of p5.js by default, which allows for the use of the FES (Friendly Error System) built into p5.js.
- includes an .eslintrc.json file in the template folder. All p5.js functions/variables are included as globals (to avoid having them trigger non-used variable/function warnings).
- includes the ESLint extension as part of the bundle.
- for any of the ESLint functionality to work, the student must install [nodejs](https://nodejs.org/), then run `npm install -g eslint` (this is only required one time, and should work on all future projects).

# p5.vscode - Original Info

p5.vscode helps you create p5.js projects in Visual Studio Code. It also includes autocompletion, a simple tool to browse and install third-party p5 libraries, and the `Live Server` extension.

Expand All @@ -11,7 +20,6 @@ I made this extension for my students in particular, but I hope it's helpful for
1. Open the Command Palette (with `command-shift-p` on Mac, or `ctrl-shift-p` on Windows) and then start typing and select `Create p5.js Project`.
2. Select a new empty folder to put your project in.
3. (optional) click the "Go Live" button in the bottom status bar to open your sketch in a browser
4. Abolish cops.

### To install p5 libraries:

Expand Down
21 changes: 21 additions & 0 deletions _note-to-self-on-building-publishing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//first, grab the updated p5js distribution by running:
./update-p5.sh (will have to be on a mac for this, or do it by hand...)
OR update-p5js.py (just need requests installed)

//if you want to update the eslint config file to match the p5js reference, run
./update-eslint-rules.py


Then...
npm install -g @vscode/vsce
npm install typescript


Then, update the package.json file to an appropriate version number, then...
vsce package
vsce publish 1.7.0 (use whatever version number you choose in package.json)



If you instead want to try to automate the version number, you could use this instead, but would need to push the repo first.
vsce publish minor
11 changes: 9 additions & 2 deletions library_installation_urls.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"marching": "https://raw.githubusercontent.com/jtnimoy/marching/master/lib/p5.marching.min.js",
"mappa": "https://raw.githubusercontent.com/cvalenzuela/Mappa/master/dist/mappa.js",
"ml5.js": "https://unpkg.com/ml5@latest/dist/ml5.min.js",
"p5.play": "https://raw.githubusercontent.com/molleindustria/p5.play/master/lib/p5.play.js",
"p5play": [
"https://cdn.jsdelivr.net/npm/p5play@3/planck.min.js",
"https://cdn.jsdelivr.net/npm/p5play@3/p5play.js"
],
"p5.particle": "https://rawgit.com/bobcgausa/cook-js/master/p5.particle.js",
"p5.Riso": "https://raw.githubusercontent.com/antiboredom/p5.riso/master/lib/p5.riso.js",
"rita.js": "https://unpkg.com/rita",
Expand Down Expand Up @@ -72,5 +75,9 @@
"https://cdnjs.cloudflare.com/ajax/libs/mathjs/9.5.1/math.js",
"https://cdn.jsdelivr.net/gh/osresearch/[email protected]/library/p5.projection.js"
],
"WEBMIDI.js": "https://cdn.jsdelivr.net/npm/webmidi@next/dist/iife/webmidi.iife.js"
"WEBMIDI.js": "https://cdn.jsdelivr.net/npm/webmidi@next/dist/iife/webmidi.iife.js",
"p5.timer": "https://raw.githubusercontent.com/scottkildall/p5.timer/master/p5.timer.js",
"c2.js": "https://raw.githubusercontent.com/ren-yuan/c2.js/main/dist/c2.min.js",
"C02Budget.js": "https://raw.githubusercontent.com/OlafVal/CO2Budget.js/master/Co2Budget.js",
"Concave Hull": "https://raw.githubusercontent.com/markroland/concaveHullJS/master/src/concaveHull.js"
}
Loading