Skip to content

Commit

Permalink
Merge pull request #18935 from storybookjs/yann/sb-639-add-disable-te…
Browse files Browse the repository at this point in the history
…lemetry-to-mainjs-in

Disable telemetry in monorepo and CI
  • Loading branch information
shilman authored Aug 15, 2022
2 parents 2daff5d + aea156c commit 3ddfe20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/repros-generator/templates/next/.stackblitzrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"installDependencies": true,
"startCommand": "yarn storybook"
"startCommand": "STORYBOOK_DISABLE_TELEMETRY=1 yarn storybook"
}
1 change: 1 addition & 0 deletions scripts/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ export async function sandbox(optionValues: OptionValues<typeof options>) {
['previewEntries'],
[`.${path.sep}${path.join(storiesPath, 'components')}`]
);
mainConfig.setFieldValue(['core', 'disableTelemetry'], true);

const storiesToAdd = [] as string[];
storiesToAdd.push(rendererPath);
Expand Down
7 changes: 6 additions & 1 deletion scripts/utils/cli-step.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export async function executeCLIStep<TOptions extends OptionSpecifier>(

await exec(
command,
{ cwd: options.cwd },
{
cwd: options.cwd,
env: {
STORYBOOK_DISABLE_TELEMETRY: 'true',
},
},
{
startMessage: `${cliStep.icon} ${cliStep.description}`,
errorMessage: `🚨 ${cliStep.description} failed`,
Expand Down

0 comments on commit 3ddfe20

Please sign in to comment.