Setup automation for Windows and macOS
Remember, anything that can be expressed as a CLI command can also be automated. Throughout the setup process, we have ensured that every tool being used was set up and its functionality was verifiable through a CLI command. This means we can easily create a PowerShell or bash script to string these commands together and ease the task of setting up and verifying new environments.Let's implement rudimentary but effective scripts to help set up your development environment.
PowerShell script
For Windows-based development environments, you need to create a PowerShell script.
- Create a file named setup-windows-dev-env.ps1
- Insert the following text, also available at https://github.com/duluca/ web-dev-environment-setup, in the file:
setup-windows-dev-env.ps1
# This script is intentionally kept simple to demonstrate basic automation techniques.
Write-Output "You must run this script in an elevated command shell, using 'Run as Administrator...