A tool for creating web components using the npm packaging system and browserify - for sweet as sweet can be re-use and encapsulation.
After observing the development of these tools and listened to the colorful and ongoing debate, I've come to believe in the following principles:
- Reproducability - a module that can be built and used at one point in time must never be broken or has its behavior changed because its dependencies change.
- Encapsulating nested dependencies. Multiple versions of the same dependency - even if not desired - must be able to co-exist in a single bundle. This is the only way of solving certain dependency problems.
- Minimal restrictions Allow for all kinds of compile-to-JS languages, pre-processed CSS, etc. For each requirement that is enforced by a bundling system, a certain part of the developer community is excluded. This is undesirable.
To create a system that conforms to these principles, one needs
- a package manager
- something that ties a. and b. together
As I believe in inventing as little as possible, Komponent solves only
- and uses npm for package management and browserify for bundling.
- Flesh out this document in more detail