Skip to content

Commit

Permalink
removing storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Oct 27, 2023
1 parent be389fe commit a61ed51
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 204 deletions.
117 changes: 0 additions & 117 deletions src/Blocks/UseStorybookCli.php

This file was deleted.

1 change: 0 additions & 1 deletion src/Cli/AbstractCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ public function getFullBlocksFiles(string $name): array
"{$name}-hooks.js",
"{$name}-transforms.js",
"{$name}.js",
"docs{$ds}story.js",
"components{$ds}{$name}-editor.js",
"components{$ds}{$name}-toolbar.js",
"components{$ds}{$name}-options.js",
Expand Down
2 changes: 0 additions & 2 deletions src/Cli/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use EightshiftLibs\Blocks\UseAssetsCli;
use EightshiftLibs\Blocks\UseGlobalAssetsCli;
use EightshiftLibs\Blocks\UseManifestCli;
use EightshiftLibs\Blocks\UseStorybookCli;
use EightshiftLibs\Blocks\UseVariationCli;
use EightshiftLibs\Blocks\UseWrapperCli;
use EightshiftLibs\Cli\ParentGroups\CliBoilerplate;
Expand Down Expand Up @@ -156,7 +155,6 @@ class Cli
UseComponentCli::class,
UseGlobalAssetsCli::class,
UseManifestCli::class,
UseStorybookCli::class,
UseVariationCli::class,
UseWrapperCli::class,
];
Expand Down
17 changes: 0 additions & 17 deletions src/Helpers/Components.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class Components

'blocksGlobalAssetsSource',
'blocksAssetsSource',
'blocksStorybookSource',
'blocksSource',
'blocksSourceCustom',
'blocksSourceComponents',
Expand All @@ -85,7 +84,6 @@ class Components

'blocksGlobalAssetsDestination',
'blocksAssetsDestination',
'blocksStorybookDestination',
'blocksDestination',
'blocksDestinationCustom',
'blocksDestinationComponents',
Expand Down Expand Up @@ -361,7 +359,6 @@ public static function getProjectPaths(string $type = '', string $suffix = '', s
$testsDataPath = ["tests", "data"];
$srcPath = "src";
$blocksPath = [$srcPath, "Blocks"];
$storybookPath = "storybook";
$assetsPath = "assets";
$cliOutputPath = "cliOutput";

Expand Down Expand Up @@ -426,13 +423,6 @@ public static function getProjectPaths(string $type = '', string $suffix = '', s
$path = self::joinPaths([...$testsDataPath, ...$blocksPath, $assetsPath]);
}
break;
case 'blocksStorybookSource':
$path = self::joinPaths([...$flibsPath, $storybookPath]);

if (\getenv('ES_TEST')) {
$path = self::joinPaths([...$testsDataPath, $storybookPath]);
}
break;
case 'blocksSource':
$path = self::joinPaths([...$flibsPath, ...$blocksPath]);

Expand Down Expand Up @@ -481,13 +471,6 @@ public static function getProjectPaths(string $type = '', string $suffix = '', s
$path = self::joinPaths([$cliOutputPath, ...$blocksPath, $assetsPath]);
}
break;
case 'blocksStorybookDestination':
$path = self::joinPaths([".{$storybookPath}"]);

if (\getenv('ES_TEST')) {
$path = self::joinPaths([$cliOutputPath, ".{$storybookPath}"]);
}
break;
case 'blocksDestination':
$path = self::joinPaths($blocksPath);

Expand Down
2 changes: 0 additions & 2 deletions src/Init/InitBlocksCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use EightshiftLibs\Blocks\UseComponentCli;
use EightshiftLibs\Blocks\UseGlobalAssetsCli;
use EightshiftLibs\Blocks\UseManifestCli;
use EightshiftLibs\Blocks\UseStorybookCli;
use EightshiftLibs\Blocks\UseVariationCli;
use EightshiftLibs\Blocks\UseWrapperCli;
use EightshiftLibs\Cli\AbstractCli;
Expand All @@ -35,7 +34,6 @@ class InitBlocksCli extends AbstractCli
public const COMMANDS = [
BlocksCli::class => [],
UseAssetsCli::class => [],
UseStorybookCli::class => [],
UseGlobalAssetsCli::class => [],
UseWrapperCli::class => [],
UseManifestCli::class => [],
Expand Down
27 changes: 0 additions & 27 deletions tests/Unit/Blocks/BlocksStorybookCliTest.php

This file was deleted.

1 change: 0 additions & 1 deletion tests/Unit/Cli/AbstractCliTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public function getCommandName(): string
$this->assertTrue(\array_key_exists('button-hooks.js', \array_flip($output)), 'button-hooks.js is missing.');
$this->assertTrue(\array_key_exists('button-transforms.js', \array_flip($output)), 'button-transforms.js is missing.');
$this->assertTrue(\array_key_exists('button.js', \array_flip($output)), 'button.js is missing.');
$this->assertTrue(\array_key_exists('docs/story.js', \array_flip($output)), 'docs/story.js is missing.');
$this->assertTrue(\array_key_exists('components/button-editor.js', \array_flip($output)), 'components/button-editor.js is missing.');
$this->assertTrue(\array_key_exists('components/button-toolbar.js', \array_flip($output)), 'components/button-toolbar.js is missing.');
$this->assertTrue(\array_key_exists('components/button-options.js', \array_flip($output)), 'components/button-options.js is missing.');
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Cli/CliTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
->not->toHaveKey(CliShowAll::class)
->and(\count($publicClasses))
->toBeInt()
->toBe(53);
->toBe(52);
// Public classes count.
});

Expand Down
16 changes: 0 additions & 16 deletions tests/data/src/Blocks/custom/button/docs/readme.mdx

This file was deleted.

18 changes: 0 additions & 18 deletions tests/data/src/Blocks/custom/button/docs/story.js

This file was deleted.

2 changes: 0 additions & 2 deletions tests/data/storybook/storybook.php

This file was deleted.

0 comments on commit a61ed51

Please sign in to comment.