I am planning to create a WordPress theme sell in themeforest.net and I prefer using TypeScript over JavaScript because TypeScript makes the code look cleaner, easier to understand, and easier to debug. Most importantly, it will be easier to update and extend the theme in the future. I am wondering if I can sell a theme built with these technologies? If so, how should I organize the directory structure and which build tools should I use (e.g., Vite, Webpack, etc.)? When selling the theme, should I upload only the files that the end user will use, or do I need to include all the .ts, .scss files, node_modules, etc.?
I have started setting up a basic WordPress theme using TypeScript and SCSS. I am considering using Vite or Webpack for the build process but I am not sure which one is more suitable for this kind of project. I am also uncertain about the best practices for organizing the project files and what exactly needs to be included when selling the theme.
SCAl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.