A template project for using p5.js with TypeScript and webpack.
Create a new project from this template using the green "Use this template" button above.
Write the project's source code in the src/
directory.
The src/sketch.ts
file provided contains a simple p5.js program with a black background and a white circle.
This file will be used as the entry point for webpack.
npm run lint:ts
npm run lint:ts
will lint the TypeScript source code using ESlint, identifying syntactic and stylistic errors based on a configured set of rules.
TypeScript linting configurations and rules can be found, edited, and updated in eslint.config.ts.mjs
.
npm run lint:js
npm run lint:js
will lint the JavaScript configuration files using ESlint, identifying syntactic and stylistic errors based on a configured set of rules.
JavaScript linting configurations and rules can be found, edited, and updated in eslint.config.js.mjs
.
npm run build:dev
npm run build:dev
will bundle your sketch in development mode using webpack.
This should identify any compiler errors present in your source code.
npm run build:prod
npm run build:prod
will create a production-ready bundle of the source code.
npm run dev
npm run dev
will bundle the sketch in development mode,
start a localhost development server (127.0.0.1:8080
),
and open a new browser window for the index.html
file bundled with the compiled sketch.
This template contains a GitHub workflows designed to update project dependencies scan the code for security vulnerabilities every month.
To learn more about Dependabot configurations, visit the GitHub Dependabot documentation.
To learn more about CodeQL configurations, visit the GitHub CodeQL documentation.
The favicon.ico of this template was designed by Freepik from Flaticon. You can find the original icon on flaticon.com.
This project is licensed under the MIT License. The full text of the license is included with this source code.