Skip to content

Commit

Permalink
🐛 Load core config schema for cli-config validation
Browse files Browse the repository at this point in the history
  • Loading branch information
wwilsman committed Nov 6, 2020
1 parent b954176 commit 75e34e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/cli-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"oclif": {
"bin": "percy",
"commands": "./dist/commands",
"hooks": {
"init": "./dist/hooks/init"
},
"topics": {
"config": {
"description": "manage Percy config files"
Expand All @@ -34,6 +37,7 @@
"@oclif/command": "^1.8.0",
"@oclif/config": "^1.17.0",
"@percy/config": "^1.0.0-beta.20",
"@percy/core": "^1.0.0-beta.20",
"@percy/logger": "^1.0.0-beta.20",
"path-type": "^4.0.0"
}
Expand Down
7 changes: 7 additions & 0 deletions packages/cli-config/src/hooks/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import PercyConfig from '@percy/config';
import { schema } from '@percy/core/dist/config';

// ensures the core schema is loaded
export default function() {
PercyConfig.addSchema(schema);
}

0 comments on commit 75e34e6

Please sign in to comment.