Skip to content

Commit

Permalink
fix: Remove unnecessary package.json name valid (#12)
Browse files Browse the repository at this point in the history
Removes an unnecessary check to ensure the `name` property in the `package.json` file of a directory `docs-parser` is being run against is exactly equal to `electron`.

This change lowers the barrier for other projects to adopt docs-parser.
  • Loading branch information
bnb authored and MarshallOfSound committed Sep 23, 2019
1 parent cc3855b commit 77e13d0
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ if (!fs.pathExistsSync(packageJsonPath)) {
process.exit(1);
}

const pj = require(packageJsonPath);
if (pj.name !== 'electron') {
runner.fail(
chalk.red(
'The package.json file in the provided directory is not for Electron, please point this tool at a Electron repository',
),
);
process.exit(1);
}

const resolvedOutDir =
typeof outDir === 'string'
? path.isAbsolute(outDir)
Expand Down

0 comments on commit 77e13d0

Please sign in to comment.