-
Notifications
You must be signed in to change notification settings - Fork 19
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
schellenberg
wants to merge
31
commits into
antiboredom:master
Choose a base branch
from
schellenberg:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For beginning programmers, having p5js use Friendly Error Messages by default is very useful for basic debugging. These changes add the un-minified version of p5.js to the project template, link to it by default in the index.html file (with comments explaining why/how to use p5.js or p5.min.js), and adds p5.js to the shell script that updates the p5 libraries.
Providing new (and old!) programmers with warnings when they make common mistakes is incredibly helpful. Unfortunately, teaching students the tools required to provide this feedback in VS Code can be frustrating. The changes in this pull request include an .eslintrc.json file that provides warnings for common JS issues. While there are plenty of reasonable rules, I have found the included ones useful for beginning programmers. The config file includes all the p5js functions/variables as globals, so that they don't trigger warnings/errors with eslint. The intended use case for this (and what I've done in the past, before finding your incredibly helpful extension) is to pre-install nodejs in the computer lab, then have students call `npm install -g eslint` once on day 1 of the semester.
Making a cs30 specific version of this extension. It would probably be better to just create a custom template that can be chosen when a new project is created, but this is a simple way to make it work for my classes for now.
implement changes from upstream
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For beginning programmers, having p5js use the Friendly Error System (FES) by default is very useful for basic debugging. A description of the FES can be found at https://github.com/processing/p5.js/blob/main/contributor_docs/friendly_error_system.md
These changes add the un-minified version of p5.js to the project template, adds it to the list of template files in extension.ts, links to it by default in the index.html file (with comments explaining why/how to use p5.js or p5.min.js), and adds a p5.js download to the shell script that updates the p5 libraries.