If you set up a new Hubot using the Slack Developer Kit for Hubot you’ll get an awesome bot, but with a lot of useless stuff in it. In this blog I’ll outline all the things that can be safely cleaned up. The scripts can run on both Powershell (Windows) and Bash (Linux/Mac).
The projects comes with a lot of useful and less useful dependencies. You can uninstall them with the following script:
# no ping, pong - please!
npm uninstall hubot-diagnostics
# [no] hablo espanol
npm uninstall hubot-google-translate
# uninstall Google maps
npm uninstall hubot-maps
# no images needed
npm uninstall hubot-google-images
# no Redis brain
npm uninstall hubot-redis-brain
# no Heroku
npm uninstall hubot-heroku-keepalive
# no pugs needed!
npm uninstall hubot-pugme
# no external scripts needed
npm uninstall hubot-scripts
# our bot can violate all the rules of Azimov
npm uninstall hubot-rules
# don't squirrel me!
npm uninstall hubot-shipit
I don’t like to use external scripts and I currently have no need for scripts in packages, so I’ll removed the files associated with it. And there’s no need for a Procfile.
Note: if you want to run scripts from NPM packages, you’ll need to keep the external-scripts.json.
# no NPM packages with scripts are needed
# no script files needed
# no need for Heroku
So, that’s it. Now I only need to find a way to share environment variables when doing Hubot development. Oh well.
About the Author
Hi! I'm Kees. Thanks for checking out my Blog. I work as a .Net Engineer for one of the biggest web-shops in the Netherlands: wehkamp. I ❤️ C# and I like to solve nifty problems.Learn more