-
Notifications
You must be signed in to change notification settings - Fork 46
Get started with Bolt locally
colbytcook edited this page Jan 12, 2023
·
32 revisions
This is a walk through of the required steps to get Bolt installed and running locally.
- Open up Terminal and type
cd
and pressenter
to reset directory - Install Oh My Zsh (
⚠️ this is needed for step 10)sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Yarn
brew install yarn
- In case of "/usr/local/Cellar is not writable." error, run this line
sudo shown -R $(whoami) /usr/local/Cellar
- In case of "/usr/local/Cellar is not writable." error, run this line
- Install XCode (the app can be found in the Mac App Store), and open it after, make sure you address any permission prompts
- Install Composer
brew install composer
- Install Git
brew install git
- Install NVM (see latest info if the following doesn't work)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
- Restart the Terminal with the command (
⚠️ this only applies if you did step 2 and using Z Shell, otherwise reference the link in the last step)source ~/.zshrc
- Install Node
nvm install 14.18.1
- Set 14.18.1 as default node version
nvm alias default 14.18.1
- In Finder, decide where you want to store code and create a folder
- Restart Terminal and
cd
into the folder to clone the Bolt repository, for examplecd Users/yourname/sites
- Clone the Bolt repository
git clone https://github.com/boltdesignsystem/bolt
- Alternatively, use the Github Desktop app to do the last 2 steps if you are not familiar with command lines in Terminal
- Move into the Bolt repo folder
cd Users/yourname/sites/bolt
- Set up Bolt
yarn setup
- If icon SVGs or Pattern Lab UI files have changed since last time you ran Bolt, you will have to build as well
yarn build
- If icon SVGs or Pattern Lab UI files have changed since last time you ran Bolt, you will have to build as well
- Run Bolt
yarn start
- This will open a local instance of Bolt in your browser (eg.
localhost:4000
)
- This will open a local instance of Bolt in your browser (eg.
- If needed, create a new branch before running
yarn setup
- Refer to the Git Naming Convention for more information referring to our branch strategy
If yarn setup
fails the first time you run it, check to see if you have PHP 7.
- Open up Terminal and type
cd
and pressenter
to reset directory - Check PHP version
php -v
- If it is not PHP 7, install PHP 7.4
brew install [email protected]
- Most likely you will have the following error due to PHP 7.4 being not supported
If you do get this error run the following commands
Error: [email protected] has been disabled because it is a versioned formula!
brew tap shivammathur/php brew install shivammathur/php/[email protected] brew link [email protected]
- Open up Finder and go to your user folder (eg.
Macintosh HD/Users/yourname
) - Press
cmd
+shft
+.
to show hidden files - Open the
.zshrc
file with a text editor (VS Code, Sublime Text, etc.) - Add the following line to the bottom of the
.zshrc
fileexport PATH="/usr/local/opt/[email protected]/bin:$PATH"
- Refresh the source
source ~/.zshrc
- Move into the Bolt repo folder again
cd Users/yourname/sites/bolt
- Set up Bolt again
yarn setup
- Basic A11y Checklist
- Get started with Bolt locally
- Bolt Specific Standards and Conventions
- How to save SVG graphics and SVG icons
- Upgrade to minor release
- Upgrade to 4.x
- Upgrade to 5.x
- Release Workflow
- VS Code Configuration
- Bolt Doc Writing Guide
- Prefixing Custom Attributes
- Standard Props for Passing Content in Twig
- Building Websites with Bolt in Drupal
- From Design Mockup to Code
- Override with Utility Classes