Skip to content

Commit

Permalink
fix(validate): don't validate in watch mode
Browse files Browse the repository at this point in the history
fixes #1647
  • Loading branch information
manucorporat committed Jun 16, 2019
1 parent d7bdecc commit 46f78ab
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/compiler/types/validate-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { getComponentsDtsTypesFilePath, isOutputTargetDistCollection, isOutputTa


export async function validatePackageJson(config: d.Config, compilerCtx: d.CompilerCtx, buildCtx: d.BuildCtx) {
if (config.watch) {
return;
}
if (buildCtx.packageJson == null) {
return;
}
Expand Down Expand Up @@ -97,10 +100,6 @@ export function validateModule(config: d.Config, compilerCtx: d.CompilerCtx, bui


export async function validateTypes(config: d.Config, compilerCtx: d.CompilerCtx, buildCtx: d.BuildCtx, outputTarget: d.OutputTargetDistTypes) {
if (config.devMode) {
return;
}

if (typeof buildCtx.packageJson.types !== 'string' || buildCtx.packageJson.types === '') {
const recommendedPath = getRecommendedTypesPath(config, outputTarget);
const msg = `package.json "types" property is required when generating a distribution. It's recommended to set the "types" property to: ${recommendedPath}`;
Expand Down

0 comments on commit 46f78ab

Please sign in to comment.