Skip to content

Commit

Permalink
Fix: quotes in hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
georgipavlov-7DIGIT committed Sep 18, 2024
1 parent 86f7ec1 commit ef11cdd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions create-block.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ touch "src/blocks/$block_name/$block_name.jsx"
touch "src/blocks/$block_name/$block_name_caterpillar.scss"

# Add the block to the block index file
echo "export * from './$block_name.jsx';" >> "src/blocks/$block_name/index.js"
echo "export * from \"./$block_name.jsx\";" >> "src/blocks/$block_name/index.js"

# Add the block to the block group index file
echo "export * from './$block_name';" >> "src/blocks/index.js"
echo "export * from \"./$block_name\";" >> "src/blocks/index.js"

# Create the locale file if block_locales is y
if [ "$block_locale" == "y" ]; then
Expand All @@ -88,13 +88,13 @@ if [ "$block_locale" == "y" ]; then
echo "{}" >> "src/blocks/$block_name/locales/pl.json"

touch "src/blocks/$block_name/locales.js"
echo "export * as en from './locales/en.json';" >> "src/blocks/$block_name/locales.js"
echo "export * as kk from './locales/kk.json';" >> "src/blocks/$block_name/locales.js"
echo "export * as ru from './locales/ru.json';" >> "src/blocks/$block_name/locales.js"
echo "export * as uk from './locales/uk.json';" >> "src/blocks/$block_name/locales.js"
echo "export * as pl from './locales/pl.json';" >> "src/blocks/$block_name/locales.js"
echo "export * as en from \"./locales/en.json\";" >> "src/blocks/$block_name/locales.js"
echo "export * as kk from \"./locales/kk.json\";" >> "src/blocks/$block_name/locales.js"
echo "export * as ru from \"./locales/ru.json\";" >> "src/blocks/$block_name/locales.js"
echo "export * as uk from \"./locales/uk.json\";" >> "src/blocks/$block_name/locales.js"
echo "export * as pl from \"./locales/pl.json\";" >> "src/blocks/$block_name/locales.js"

echo "export * as $block_name from './$block_name/locales.js';" >> "src/blocks/locales.js"
echo "export * as $block_name from \"./$block_name/locales.js\";" >> "src/blocks/locales.js"
fi

# Add the block to the main block file
Expand Down
2 changes: 1 addition & 1 deletion create-hook.bash
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default use$hook_name;
fi

# Add the hook to the hooks index file
echo "export * from './use$hook_name';" >> "src/hooks/index.js"
echo "export * from \"./use$hook_name\";" >> "src/hooks/index.js"

# Output to the user's console
echo "Successfully created use$hook_name hook in src/hooks"
14 changes: 7 additions & 7 deletions create-page.bash
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ touch "src/pages/$page_name/$page_name.jsx"
touch "src/pages/$page_name/$page_name_caterpillar.scss"

# Add the page to the page index file
echo "export * from './$page_name.jsx';" >> "src/pages/$page_name/index.js"
echo "export * from \"./$page_name.jsx\";" >> "src/pages/$page_name/index.js"

# Add the page to the page group index file
echo "export * from './$page_name';" >> "src/pages/index.js"
echo "export * from \"./$page_name\";" >> "src/pages/index.js"

# Create the page locale files if page_locale is y
if [ "$page_locale" == "y" ]; then
Expand All @@ -90,11 +90,11 @@ if [ "$page_locale" == "y" ]; then


touch "src/pages/$page_name/locales.js"
echo "export * as en from './locales/en.json';" >> "src/pages/$page_name/locales.js"
echo "export * as kk from './locales/kk.json';" >> "src/pages/$page_name/locales.js"
echo "export * as ru from './locales/ru.json';" >> "src/pages/$page_name/locales.js"
echo "export * as uk from './locales/uk.json';" >> "src/pages/$page_name/locales.js"
echo "export * as pl from './locales/pl.json';" >> "src/pages/$page_name/locales.js"
echo "export * as en from \"./locales/en.json\";" >> "src/pages/$page_name/locales.js"
echo "export * as kk from \"./locales/kk.json\";" >> "src/pages/$page_name/locales.js"
echo "export * as ru from \"./locales/ru.json\";" >> "src/pages/$page_name/locales.js"
echo "export * as uk from \"./locales/uk.json\";" >> "src/pages/$page_name/locales.js"
echo "export * as pl from \"./locales/pl.json\";" >> "src/pages/$page_name/locales.js"

echo "export * as $page_name from './$page_name/locales.js';" >> "src/pages/locales.js"
fi
Expand Down

0 comments on commit ef11cdd

Please sign in to comment.