1 | #!/usr/local/bin/node
|
2 |
|
3 | const chalk = require("chalk");
|
4 | const packageJson = require("./package.json");
|
5 |
|
6 | const name = packageJson.name;
|
7 | const displayName = packageJson.storybook.displayName;
|
8 |
|
9 | if (name.includes("addon-kit") || displayName.includes("Addon Kit")) {
|
10 | console.error(
|
11 | chalk.red.bold`
|
12 | ⚠️ Please configure appropriate metadata before publishing your addon.
|
13 | `,
|
14 | chalk.red`
|
15 | Your package name and/or displayName includes default values from the Addon Kit.
|
16 | The addon gallery filters out all such addons.
|
17 |
|
18 | For more info on addon metadata, see: https://storybook.js.org/docs/react/addons/addon-catalog#addon-metadata
|
19 | `
|
20 | );
|
21 |
|
22 | process.exit(1);
|
23 | }
|