Skip to content

Commit

Permalink
fix brl
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed May 14, 2024
1 parent e36887c commit ef375ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"lint:fix": "yarn g:lint:fix",
"lint:templates": "turbo --filter \"./templates/plate-playground-template/**\" lint --no-daemon",
"nuke:node_modules": "rimraf '**/node_modules'",
"p:brl": "cd $INIT_CWD && barrelsby -d $INIT_CWD/src -D -l all -q -e '.*__tests__.*|(.*(fixture|template|spec|internal|server).*)|server.ts' && [ -d \"$INIT_CWD/src/server\" ] &&barrelsby -d $INIT_CWD/src/server -l all -q",
"p:brl": "sh scripts/brl.sh",
"p:brl:below": "cd $INIT_CWD && barrelsby -d $INIT_CWD/src -D -l below -q -e '.*__tests__.*|(.*(fixture|template|spec|internal).*)|server.ts'",
"p:build": "cd $INIT_CWD && yarn p:tsup",
"p:build:watch": "cd $INIT_CWD && yarn p:tsup --watch",
Expand Down
12 changes: 12 additions & 0 deletions scripts/brl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# Change to the initial working directory
cd "$INIT_CWD" || { echo "Failed to change directory to $INIT_CWD"; exit 1; }

# Run barrelsby on the src directory
barrelsby -d "$INIT_CWD/src" -D -l all -q -e '.*__tests__.*|(.*(fixture|template|spec|internal|server).*)|server.ts'

# Check if the src/server directory exists and run barrelsby if it does
if [ -d "$INIT_CWD/src/server" ]; then
barrelsby -d "$INIT_CWD/src/server" -l all -q
fi

0 comments on commit ef375ed

Please sign in to comment.