First we need to create a Vite plugin for PureScript. PureScript is a language very similar to Haskell which compiles to JavaScript. Having a Vite plugin for that would help both developers from JavaScript and from Haskell to use and integrate PureScript into new or ongoing web projects.
Then We'll need to write a Vite template to make the boilerplate and settings of Vite for a minimal cardano dapp example project using PureScript and optionally the server-side boilerplate. This template can be called with a simple npx create cardano-dapp
.
Finally we must have a good doc page explaining how to begin to build Cardano dApps using our template, and link this on Cardano docs and input-output-hk/essential-cardano on Github.
- increase the number and the quality of Cardano Open Source projects
Vite is a tool to improve the developer experience in the JavaScript ecosystem. PureScript is a language that encourages the production of good quality code and interacts very well with the JavaScript ecosystem. But using the two together is now not a pleasant experience. Having an entry point to build dapps in Cardano with familiar JavaScript tools would open up a huge opportunity for growth in this ecosystem, increasing the number, and because the incentive to use PureScript, also the quality of the projects.
- increase the number of contributors
Having a way to seamless move from JavaScript to PureScript, with Cardano incentive, would increase the number of contributions in Cardano Haskell projects, due to the shared characteristics between the languages. We would see also more contributions on PureScript ecosystem as well, and more incentives to PureScript libs for Cardano blockchain.
- increase of open source tools and frameworks from the community for the community (dog-fooding)
The Vite plugin system allows extensibility beyond PureScript compilation, having this as a pillar would allow us to naturally build many other plugins like IDE tools, frameworks, libraries and more interoperability with other web tools.
We may need to create some PureScript library to deal with the cardano server-side code.
The version of PureScript with ESM support (0.15) is developed, but is being tested, so there is a small chance of being stucked by that, but it can be circumvented.
There is a rollup plugin for PureScript, which may be used in the Vite plugin. I also have seen a project with PureScript and Vite before (which can be used as reference). But we may need to build these from scratch too.