Cleaning up the default Hubot Slack installation
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 project 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 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
# no NPM packages with scripts are needed rm external-scripts.json # no script files needed rm hubot-scripts.json # no need for Heroku rm Procfile
So, that’s it. Now I only need to find a way to share environment variables when doing Hubot development. Oh well.