mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2025-01-08 07:27:44 +03:00
Call the examples regeneration script from the add example script
This commit is contained in:
parent
18da65c4af
commit
d6d1ae09fa
@ -47,6 +47,15 @@ echo "Creating \`Examples.${example_name}\` for you in the component-catalog fol
|
||||
path=component-catalog/src/Examples/"${example_name}.elm"
|
||||
printf "${template}" >| "${path}"
|
||||
|
||||
echo ""
|
||||
echo "Created ${path}."
|
||||
|
||||
echo ""
|
||||
echo "Regenerating \`Examples.elm\` so it inclues \`Examples.${example_name}\`."
|
||||
|
||||
. ./script/regenerate-examples.sh
|
||||
|
||||
|
||||
echo ""
|
||||
echo "🚨 There are TODOs for you to complete in ${path}. 🚨"
|
||||
echo ""
|
@ -63,6 +63,8 @@ type Msg
|
||||
MSG
|
||||
)
|
||||
|
||||
echo "Cataloging the \`component-catalog/src/Examples/\` folder..."
|
||||
|
||||
cd component-catalog/src/Examples/
|
||||
i=0
|
||||
for example in *
|
||||
@ -92,8 +94,12 @@ done
|
||||
cd ..
|
||||
|
||||
|
||||
echo "Replacing \`component-catalog/src/Examples.elm\`..."
|
||||
|
||||
printf "${file_open}" >| Examples.elm
|
||||
printf "\n\n${imports}\n\n\n" >> Examples.elm
|
||||
printf "${all}\n\n\n" >> Examples.elm
|
||||
printf "${state}\n\n\n" >> Examples.elm
|
||||
printf "${msg}\n" >> Examples.elm
|
||||
|
||||
echo "Done! \`Examples\` should now be up to date."
|
Loading…
Reference in New Issue
Block a user