konami-js library to cljsjs project

konami-js is a small JS library that I, more often than not, used in various projects. The library introduces the Konami code easter egg to your project. It’s a fun little feature that I wanted to bring a bit closer to the ClojureScript community so I opted in to add it to the CLJSJS project. CLJSJS project packages JavaScript libraries with Google Closure externs which makes them easily accessible from ClojureScript projects. You can access all libraries packaged this way as a simple ClojureScript dependency.

There is a great tutorial on CLJSJS GitHub page wiki on how to contribute to the project and the whole process is fairly easy. The two most important things are creating a build.boot and an externs file. There is a pretty much standard way for doing them both which utilizes external services. The primary thing in the build.boot file is to define the location of the JavaScript library source. A lot of libraries use the unpkg.com service if the source library is hosted on npm which konami-js is. The rest of the file is a standard way to pack a library. See the file here. The externs file is needed for the ClojureScript advanced compilation. There are tools online for creating an externs file such as javascript-externs-generator.

The pull request was merged in main with this commit.

[Updated 29.08.2023.] CLJSJS project is deprecated, but will still maintain the most common packages. I will continue to submit updates to konami-js when they come and as long as the cljsjs team lets me.