Tools and Setup
Software and setup instructions can change quickly, which is why specifics weren’t included in the book. Here are the basics to get yourself up and running quickly.
Here are some recommended plain-text editors to help get you started. All are free software, although the full version of BBEdit requires a license.
- Windows: Notepad++
- macOS: BBEdit. Note that BBEdit replaces TextWrangler, which was mentioned in the book. The full BBEdit may be used for a 30-day evaluation period, after which “you can continue to use BBEdit for free, forever, with no nag screens or unsolicited interruptions,” according to Bare Bones Software’s website.
- All Platforms: Atom, a text editor written by a team at GitHub. This editor is very popular with my students.
Firefox Developer Edition is my browser of choice for development purposes. I usually add to it Chris Pederick’s Web Developer Add-on, which is also available for Chrome, if you prefer to develop or test sites in Google Chrome.
Node.js is that you can use to run multiple tools, including the command-line
http-server development server to test your website.
While there are standalone installers for Node.js on all operating systems, macOS and Linux users should consider using a package manager to install Node.js. Linux will already have a package manager, but macOS requires you to install one. Homebrew is my macOS package-manager of choice; if the instructions on that page do not work on your version of macOS/OS X, there are additional installation instructions that you can consult.
With a package manager like Homebrew, installing Node.js just requires a simple terminal command:
$ brew install node
brew is the name of the package manager. On Linux, that might be
pacman, or whatever the package manager of choice is on your Linux distribution. The advantage of using a package manager is that you can easily update all of your installed software later. For example, to upgrade all of your Homebrew-installed packages, run:
$ brew update $ brew upgrade
Node.js includes the Node Package Manager (npm), which can be used to install Node.js packages. Run
npm on the command line to install the package you need. For example, to install the http-server package, you would run:
$ npm install -g http-server
-g part instructs npm to install the http-server package globally, so that you can use it in any directory where you’re working on a website. Note that, depending on how you’ve installed Node, you may have to prefix the command with
sudo, which will then prompt you for your administrative password:
$ sudo npm install -g http-server
The npm documentation offers several workarounds for installing Node.js packages globally without having to use
Here are some recommended packages to start with:
- http-server: A simple, zero-configuration web server for development purposes. Install by running
npm install -g http-server
- htmllint: A basic but effective HTML linter. Install by running
npm install -g htmllint
- stylelint: A solid CSS linter. Install by running
npm install -g stylelint
npm install -g eslint
You will need to have configuration files to run htmllint, stylelint, and ESLint. Starter configuration files are all included in the RPK.