diff --git a/packages/cli-config/package.json b/packages/cli-config/package.json index 527e11a1d..cb6a83f35 100644 --- a/packages/cli-config/package.json +++ b/packages/cli-config/package.json @@ -24,6 +24,9 @@ "oclif": { "bin": "percy", "commands": "./dist/commands", + "hooks": { + "init": "./dist/hooks/init" + }, "topics": { "config": { "description": "manage Percy config files" @@ -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" } diff --git a/packages/cli-config/src/hooks/init.js b/packages/cli-config/src/hooks/init.js new file mode 100644 index 000000000..735ef4b31 --- /dev/null +++ b/packages/cli-config/src/hooks/init.js @@ -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); +}