Blog

BASH: Minifying and combining JavaScript files

Wednesday 24 October 2018

Sass has the nice feature of taking a group of source files and putting them together as a single CSS file, with the advantage of reducing the number of HTTP connections the web browser has to open when loading your webpage, thus speeding it up. It also has the option to minify the code—taking out any characters that are purely cosmetic. In this article we will perform a similar task for JavaScript files, using BASH and a JavaScript minifier program.

Read More

BASH: Making a simple 'Yes/No' Prompt

Friday 19 October 2018

On Linux I often use the shutdown now command to shut down my computer, so I thought I would alias it to sdn. However, I was concerned that it might be too easy to accidentally type these three characters and end up losing unsaved work, so I decided to implement a prompt to confirm the shutdown. In this article we shall be looking at how I implemented this with a simple BASH script.

Read More