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
961 stars 121 forks source link

Added babel build and eslint file #52

Closed DavideCarvalho closed 5 years ago

DavideCarvalho commented 6 years ago

So, I've added .babelrc and .eslint files to the project. I changed konami.js from the root to a folder called "src" and the builded file is at "lib". node_modules and lib folder is git ignored. eslint is added and added document and window as globals so linter stops saying that they aren't defined. I edited some easy parts of the code, so the linter stops complaining.

DavideCarvalho commented 6 years ago

referencing #45 Should create a issue to babel, maybe use #47 ?

DavideCarvalho commented 6 years ago

I've send this PR so you can code review it and see if you want something different.

georgemandis commented 6 years ago

I'm getting sha integrity errors when I run npm install on this. It looks like your'e running Nexus Repository? I don't know much about Nexus, to be honest, but I noticed some of the URLs in package-lock.json look like this, which is the source of the issue:

http://nexus.produbanbr.corp/repository/npm-all/@babel/code-frame/-/code-frame-7.0.0.tgz

I deleted the file and ran npm install to generate a new package-lock.json and it worked fine.

Can you fix this and resubmit? And maybe knockout #46 while you're there since that's a fairly easy one :)

I'm going to merge all this work into the 2.0 branch while we're working on it.

DavideCarvalho commented 6 years ago

Sorry, i did this change using my work machine, I forgot to remove the npm registry we use in here. I commited the remove of package-lock

DavideCarvalho commented 6 years ago

Removed bower.json as well It should close #46

georgemandis commented 5 years ago

I pulled your changes into the 2.0 branch I’ve been working on, so I’m going to close this for now.