npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-p5-project

v1.0.1

Published

An npm / npx starter template for P5 projects using Typescript and Hot Reload preview

Downloads

4

Readme

Create P5 Project

Introduction

An npm / npx starter template for P5 projects using Typescript and Hot Reload preview. This tool simplifies the process of setting up a p5.js project, allowing you to focus on creating fully parametric 2D drawings, 2D animations, and fully interactive vector-based experiences in the browser with ease.

Demo GIF

Features

  • 🚀 Easy Setup: Initialize your P5 project with a single command.
  • 💻 TypeScript Support: Leverage the power of TypeScript for more robust code.
  • 🔁 Hot Reload Preview: Instantly view changes in your design as you code.
  • 📁 Automated Structure and Dependency Management: Automatically creates the necessary folder structure and installs dependencies.
  • 🎨 Focus on Design: Spend more time designing and less on setup.
  • 🛠️ Integrated VSCode Experience: Recommended extensions and launch configurations for a seamless development experience.
  • 📤 SVG Export Option: Export your designs SVG format.

Like this project? ❤

Please consider:

Getting Started

Prerequisites

Ensure you have Node.js installed on your system to use npm or npx.

Installation

To create a new P5 project, run the following command in your terminal:

npm init p5-project <your-project-name>

or

npx create-p5-project <your-project-name>

This command will create a new directory with your project name, set up the folder structure, and install all the necessary dependencies.

Templates

To use a specific template, pass the --template argument when creating a new project. For example:

npm init p5-project <your-project-name> -- --template=screw-and-nut

To list available templates you can run:

npx create-p5-project --list-templates

There are currently three templates available:

  • default: A blank canvas for whatever project you're working on.
  • svg-export: Contains a screw and nut for you to play with.
  • sound: Contains a screw and nut for you to play with.

More templates will be added soon, hopefully by contributors too!

VSCode Integration

  • Recommended Extensions: The generated .vscode directory contains recommendations for helpful extensions. Please review and install them to enhance your development experience.
  • Launch Configuration: Use the "Launch P5" configuration in the Run and Debug section of VSCode. This will open the design.ts file, run npm run dev, and open the preview browser.
    • Note: The first time you run this, the preview browser may initially display a white screen. Please wait until the debug output indicates that it's safe to reload the simple browser panel.

Alternatively - Development in other IDEs

If you are NOT using VSCode, or if you'd rather run the dev environment manually, then, after setting up your project, navigate to your project directory and start the development server:

cd <your-project-name>
npm run dev

Preview and Export

  • The project uses Vite to provide a hot reload dev server to be able to preview changes to the design any time you save.
  • To export to SVG, you can set the renderSvg variable to true and serialize the SVG html element for download. For an example you can use the svg-export template.

Related Projects and Resources

create-p5-project is built upon and inspired by the capabilities of p5.js. Here are some resources and related projects that can enhance your experience with p5.js:

  • p5.js: The core framework upon which this project is based. For more information and documentation, visit P5's website.

  • p5.js Cheat Sheet: A handy guide for quick reference to P5 syntax and features. Perfect for beginners and experienced users alike. Check out the P5 Cheat Sheet by Andreas Metz.

  • Using p5.js & React to fill a Canvas: Dive into a practical example of integrating p5.js with React for creative coding in this informative talk by Monica Powell. Watch the Using p5.js & React to fill a Canvas video for insights and inspiration.

  • Processing: The Processing software is used by thousands of visual designers, artists, and architects to create their works. It is the parent project of p5.js. For more information and documentation, visit the Processing website.

Contributing

Contributions are welcome! Feel free to submit pull requests or open issues to improve create-p5-project.

Contributors

License

This project is licensed under the Apache-2.0.

Happy Designing with create-p5-project!