This moves the files from the archive-storybook repo into the shared package.
This did require changing a few things around:
The archive-storybook and build-archive-storybook script bodies were converted to functions and exported from the shared package. Both the playwright and cypress packages have matching script files in bin that import the functions from shared and invoke them. Those files are listed as bin scripts in each package.json.
The repo also contained storybook files that just need to be on the file system -- main.ts, preview.ts, and preset.ts. These now live in the root of the shared package (not src) in a directory named storybook-config. That directory is symlinked in the src directory of both the pw and cy packages, where they are built into each respective dist directory. The scripts above use dist/storybook-config as the storybook config dir. (The symlink feels weird but seems to be an ok option for now.)
The archive-storybook:playwright and build-archive-storybook:playwright (and the ones for cypress) commands for this repo point directly to the scripts built into dist so that our tests run the latest version of things.
Issue: #
What Changed
This moves the files from the
archive-storybook
repo into theshared
package.This did require changing a few things around:
archive-storybook
andbuild-archive-storybook
script bodies were converted to functions and exported from theshared
package. Both theplaywright
andcypress
packages have matching script files inbin
that import the functions fromshared
and invoke them. Those files are listed asbin
scripts in eachpackage.json
.main.ts
,preview.ts
, andpreset.ts
. These now live in the root of theshared
package (notsrc
) in a directory namedstorybook-config
. That directory is symlinked in thesrc
directory of both thepw
andcy
packages, where they are built into each respectivedist
directory. The scripts above usedist/storybook-config
as the storybook config dir. (The symlink feels weird but seems to be an ok option for now.)archive-storybook:playwright
andbuild-archive-storybook:playwright
(and the ones for cypress) commands for this repo point directly to the scripts built intodist
so that our tests run the latest version of things.How to test