nice-registry / all-the-package-names

🔤 A list of all the public package names on npm. Updated daily.
242 stars 28 forks source link

Remove the trailing slash #2

Closed IonicaBizau closed 8 years ago

IonicaBizau commented 8 years ago

We can simply require(".") to require the current directory. :grin:

zeke commented 8 years ago

No way! Wish I knew that a long time ago.

It will take me a lifetime to remove all those unneeded slashes from all my projects. :)

zeke commented 8 years ago

Thanks @IonicaBizau. This change will roll out the next time the release script runs itself.

IonicaBizau commented 8 years ago

@zeke Just create a script to replace and update that across the repos. 😄 It's probably something like :%s/\(('|")\.\./('|")\)/\('\.\.'\) and :%s/\(('|")\./('|")\)/\('\.'\).

Actually, if you like, I can do it for you. 😜

zeke commented 8 years ago

Actually, if you like, I can do it for you. 😜

Be my guest!

IonicaBizau commented 8 years ago

@zeke Done. 🚀 🎉

Probably I spammed you with few emails, but for convenience, check this out: https://github.com/pulls?utf8=✓&q=is%3Aopen+is%3Apr+author%3AIonicaBizau+user%3Azeke

Some of the tests are failing, but most probably because .travis.yml is missing.

This is the magic command:

sed -i -e "s/require(\"\.\/\")/require\(\'\.\'\)/g" *.js && rm *.js-e && git commit -m 'Removed trailing slash' . && git push --all

zeke commented 8 years ago

@IonicaBizau you are a wizard. Thanks so much! I had forgotten about half those projects. 🙈

IonicaBizau commented 8 years ago

@zeke Cool! You're welcome. 😁 I update mine each few months, automagically (especially keeping the README.md files to follow the same template). 🚀