Show plugin documentation in Flipper
Reviewed By: passy Differential Revision: D29392524 fbshipit-source-id: 675de1fc070b1b8b22d0b27721c16dbd6f7076ef
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e4fb2907fd
commit
9fc85730ba
@@ -107,6 +107,14 @@ async function buildPlugin() {
|
||||
packageJson.engines.flipper = minFlipperVersion;
|
||||
}
|
||||
packageJson.version = argv.version;
|
||||
if (await fs.pathExists(path.join(pluginDir, 'docs', 'overview.mdx'))) {
|
||||
packageJson.publishedDocs = packageJson.publishedDocs ?? {};
|
||||
packageJson.publishedDocs.overview = true;
|
||||
}
|
||||
if (await fs.pathExists(path.join(pluginDir, 'docs', 'setup.mdx'))) {
|
||||
packageJson.publishedDocs = packageJson.publishedDocs ?? {};
|
||||
packageJson.publishedDocs.setup = true;
|
||||
}
|
||||
await fs.writeJson(packageJsonPath, packageJson, {spaces: 2});
|
||||
const packCmd = `yarn pack --cwd "${pluginDir}" --filename ${outputFile}`;
|
||||
execSync(packCmd, {cwd: rootDir, stdio: 'inherit'});
|
||||
|
||||
Reference in New Issue
Block a user