Vite - a script for quick template-based project scaffolding
This script gives me a consistent start for a new project, with my standard logging, utilities, and other things I rely on and would otherwise copy and paste from previous projects.
A tech blog giving usable explainers, advice, tools, tricks and techniques for the Konva JavaScript canvas library, the HTML5 canvas, and related subjects.
This script gives me a consistent start for a new project, with my standard logging, utilities, and other things I rely on and would otherwise copy and paste from previous projects.
In part #1 I talked about setting up a Vite project from VSCode. That's only half the job because sooner or later you'll need to share what you made, and maybe one day even make it live. And let's not overlook testing.
When I moved over to TypeScript I could see the benefits but the code-transpile-test loop was way to slow, and I found a whole new world of pain in the form of bundlers. That was before I found Vite - since then my productivity is up and my frustration down. Here's why...
I'm writing a JavaScript lib with TypeScript, using the excellent Vite for on-the-fly transpiling and packaging. This post is about the configuration that I use and specifically covers removal of comments.
I needed some niche automated testing for my keyboard and mouse handler for a canvas-focussed rich text editor control I'm working on. I have to mock a series of user actions and run multiple tests. I had to go DIY - here's what I made...