Other languages (wiki): [ ja ]
Template project for creating p5.js sketches using the following tools:
- Code editor: Visual Studio Code
- Other tools: Prettier, ESLint and TypeScript.
See also other templates.
-
Install the two below if not yet installed:
-
Create your project folder by copying this template, then open it with VS Code.
-
Run the command-line below, which will install several dependencies:
npm install
-
Install the VS Code extensions:
- ESLint
(from CLI:
code --install-extension dbaeumer.vscode-eslint
) - Prettier - Code formatter
(from CLI:code --install-extension esbenp.prettier-vscode
)
Now ESLint and Prettier works automatically every time you save your code.
- ESLint
(from CLI:
-
Feel free to edit
src/script.ts
. -
Run the command-line below to build
dist/script.js
:npm run build
-
Open
dist/index.html
to see the result.