Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
babel-plugin-p5-push-pop
Advanced tools
This babel plugin provides you a way to organize your P5 code. It replaces all anonym blocks with `push` and `pop`. The advantage is less writing work and now you can fold and indent these blocks automatically within your IDE.
This babel plugin provides you a way to organize your P5 code.
It replaces all anonym blocks with push
and pop
.
The advantage is less writing work and now you can fold and indent these blocks
automatically within your IDE.
you can now write this:
function setup() {
ellipse(0, 50, 33, 33);
{
strokeWeight(10);
fill(204, 153, 0);
ellipse(33, 50, 33, 33);
{
stroke(0, 102, 153);
ellipse(66, 50, 33, 33);
}
}
ellipse(100, 50, 33, 33);
}
instead of:
function setup() {
ellipse(0, 50, 33, 33);
push();
strokeWeight(10);
fill(204, 153, 0);
ellipse(33, 50, 33, 33);
push();
stroke(0, 102, 153);
ellipse(66, 50, 33, 33);
pop();
pop();
ellipse(100, 50, 33, 33);
}
yarn add -D babel-plugin-p5-push-pop
# or
npm install -D babel-plugin-p5-push-pop
.babelrc
{
"presets": ["@babel/env"],
"plugins": ["p5-push-pop"]
}
You can find a fully working example inside ./example
.
Just run npm install
and npm start
or npm build
.
FAQs
This babel plugin provides you a way to organize your P5 code. It replaces all anonym blocks with `push` and `pop`. The advantage is less writing work and now you can fold and indent these blocks automatically within your IDE.
We found that babel-plugin-p5-push-pop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.