@@ -12,13 +12,13 @@ import prompts from 'prompts'
1212 * new example, plugin, or other playground shows up here for free, with no
1313 * change to this script.
1414 */
15- const WORKSPACE_PATTERNS = [ 'packages /*' , 'plugins /*' , 'examples /*' , 'storybook' , 'docs ']
15+ const WORKSPACE_PATTERNS = [ 'examples /*' , 'packages /*' , 'plugins /*' , 'storybook' ]
1616
1717/**
1818 * Script names that make a workspace package runnable as a "play" — the
1919 * first one present in a package's `scripts` wins.
2020 */
21- const RUN_SCRIPTS = [ 'dev' , 'storybook' , 'docs' , ' start']
21+ const RUN_SCRIPTS = [ 'dev' , 'storybook' , 'start' ]
2222
2323const rootDir = resolve ( dirname ( fileURLToPath ( import . meta. url ) ) , '..' )
2424
@@ -38,6 +38,7 @@ function expandPattern(pattern: string): string[] {
3838 return readdirSync ( baseDir , { withFileTypes : true } )
3939 . filter ( entry => entry . isDirectory ( ) )
4040 . map ( entry => `${ base } /${ entry . name } ` )
41+ . sort ( ( a , b ) => a . localeCompare ( b ) )
4142}
4243
4344function findPlay ( dir : string ) : Play | undefined {
@@ -61,7 +62,6 @@ async function main(): Promise<void> {
6162 . flatMap ( expandPattern )
6263 . map ( findPlay )
6364 . filter ( ( play ) : play is Play => play !== undefined )
64- . sort ( ( a , b ) => a . dir . localeCompare ( b . dir ) )
6565
6666 if ( plays . length === 0 ) {
6767 console . error ( `No playgrounds found — none of ${ WORKSPACE_PATTERNS . join ( ', ' ) } has a package.json with a ${ RUN_SCRIPTS . join ( '/' ) } script.` )
0 commit comments