Hi there,
I want to build a small library for interacting with a chess board. It should only handle the board (drawing the board, moving pieces to a selected square) but not the game logic. I know that libraries like this exist but I want to use this project for practicing the following:
- Developing a library that can be used in the browser (included via
<script>
tag) and also be installed with npm. - Using build tools: E.g. Writing code in ES6 (or even TypeScript) and transpiling it so that it will be supported by most browsers.
- How to handle dependencies in such a project: I will probably use jQuery as a dependency. However jQuery should not be bundled into the build library since it it would be expected that the website already includes it via a
<script>
tag before my library.
I know there exist tools like webpack, gulp, etc that may get this job done. However I’m a bit overwhelmed by the number of available tools and want to make sure to choose the right tool for my job. I already started to study the webpack documentation but I have the feeling that webpack is more suited to larger applications instead of small libraries.
Thanks in advance!