Skip to content

Commit 77e13d0

Browse files
bnbMarshallOfSound
authored andcommitted
fix: Remove unnecessary package.json name valid (#12)
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.
1 parent cc3855b commit 77e13d0

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/bin.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ if (!fs.pathExistsSync(packageJsonPath)) {
4141
process.exit(1);
4242
}
4343

44-
const pj = require(packageJsonPath);
45-
if (pj.name !== 'electron') {
46-
runner.fail(
47-
chalk.red(
48-
'The package.json file in the provided directory is not for Electron, please point this tool at a Electron repository',
49-
),
50-
);
51-
process.exit(1);
52-
}
53-
5444
const resolvedOutDir =
5545
typeof outDir === 'string'
5646
? path.isAbsolute(outDir)

0 commit comments

Comments
 (0)