Setting up Homebrew, NPM and Eleventy on a fresh mac

I've recently reformatted my mac and was looking to get started with Eleventy. Although, once you have Eleventy generating it creates static files, it requires NPM and Node to generate.

There are several ways to install Node and NPM on a Mac, but I would highly recommend installing Homebrew. It makes installing extra packages and dependencies much easier than trying to compile from source.

Once you have followed the install instructions on the Homebrew website, you can then go ahead with installing NPM (which, in turn, will install Node). This can be done by entering the following in your terminal:

$ brew install npm

With node and NPM installed, 11ty can be set up following the instructions on the website.

npm init -y
npm install --save-dev @11ty/eleventy

To be honest, when I started that this blog I thought it would be longer and more complex. Homebrew makes this process a lot less painful

You might also enjoy

Mike Street

Written by Mike Street

Mike is a front-end developer from Brighton, UK. He spends his time writing, cycling and coding. You can find Mike on Twitter.