Percy visual regression snapshots for client sites.
npm install- Export your Percy token for the project you're running:
export PERCY_TOKEN=your_percy_token_here- Run snapshots:
npm run snap:royalmtLive
npm run snap:royalmtSTG
npm run snap:lindauer- Add the project config to
config/projects.js:
newProject: {
name: "New Project Name",
baseUrl: "https://newproject.com"
}- Add its pages to
config/pages.js:
newProject: [
'/',
'/about/',
'/contact/'
]- Add the npm script to
package.json:
"snap:newProject": "npx percy exec -- node snapshots.js newProject"The project key (e.g.
newProject) must match exactly across all three files.
├── config/
│ ├── projects.js # Project names and base URLs
│ └── pages.js # Pages to snapshot per project
├── snapshots.js # Main runner
├── .env # Your PERCY_TOKEN (never commit this)
└── .env.example # Safe to commit