Build system #6
Replies: 4 comments 18 replies
-
👍 The anti-bikeshedding auto formatting of Go really grew on me, and that's something I'd like to add on mobile repos as well. For the rest I'll let people more versed in Web development chime in, but I'll suggest two guidelines:
|
Beta Was this translation helpful? Give feedback.
-
We’ll take a look and discuss it ASAP @ Jellybooks so that we can provide more thorough/robust feedback – not that there is anything surprising, but we have to do our homework about TSDX. Thanks for the proposal. |
Beta Was this translation helpful? Give feedback.
-
Another option I discovered recently: tsup which is powered by esbuild. It doesn't support as many features out of the box, we would have to build our own testing, examples, code quality etc. But we could pull the defaults of those from tsdx and use the bundler from tsup if desired. |
Beta Was this translation helpful? Give feedback.
-
I’ll ask Julien to take part in the discussion should he have anything to clarify, discuss or add. @mickael-menu BTW is the test-case for Kotlin/Swift available publicly somewhere? I can recall you mentioning you would gladly share it but fails to remember if you ever had to do that “manually.” |
Beta Was this translation helpful? Give feedback.
-
Hi all,
As discussed in the weekly meeting yesterday, here is my proposal for a build system for Readium web.
Our needs
The recommendation
As you probably know, the world of web build systems can be quite frustrating. There is seemingly endless configuration, difficult debugging, and a rapidly changing ecosystem of tools and best practices. It's prettymuch the embodiment of why web dev is annoying and difficult. Over the past 5 years, I've been reaching more and more towards so-called "zero-config" tools, which basically set up and maintain a ready-to-use build and development environment for you with best practices. Usually they can be configured, but don't need to be. For TS libraries I recommend TSDX. It's extremely simple, has all the features we need, and is officially recommended by Typescript themselves.
TSDX
You can read more about it on the website, but below is an overview of what it uses internally. The nice part is you don't really need to know most of this because it is already configured and for our use case there would be little need to change anything:
I don't think we would need any configuration changes, besides maybe massaging some formatting or lint settings if desired. I have used TSDX many times and have been very pleased with the results, and it is also in use by many other projects and companies large and small. Actively maintained, official Typescript recommendation, etc.
Other options
I haven't tried many other zero-config setups (not sure there are many others for this use case?), but we could always set up our own custom build system if that is desired. Some tooling options:
Let me know what you all think. I'm happy to make a PR adding TSDX if you'd like. Would love to get this set up soon so that I can start using the shared modules!
Beta Was this translation helpful? Give feedback.
All reactions