georgemandis / konami-js

Adding the Konami Code easter egg to your projects since 2009! Compatible with gestures on smartphones and tablets as well. Compatible with all front-end frameworks and vanilla JavaScript
http://konamijs.mand.is/
MIT License
959 stars 122 forks source link

Incorporate some kind of bundler support #48

Closed georgemandis closed 3 years ago

georgemandis commented 5 years ago

I'm not sure what approach to take here. Konami-JS has no external dependencies (which I'd like to stay that way) but I want the project to accommodate more modern toolchains.

Should I provide separate configuration files for the more popular ones? Webpack? Parcel? Rollup?

I'm open to a big discussion here because I'm not really sure what makes the most sense for a project like this where one of my goals is to keep the barrier-to-entry low.

DavideCarvalho commented 5 years ago

Rollup is great for libraries. Configuration is really easy and exports for the newest js modules, like esm (es modules), so evergreen browsers can import with type=module

DavideCarvalho commented 5 years ago

Bundlers are also great for smart bundling, this article is great for explaining it