Skip to content

Commit

Permalink
only prompt in music
Browse files Browse the repository at this point in the history
  • Loading branch information
notwaldorf committed Feb 21, 2020
1 parent 9acefe2 commit dc42a55
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions scripts/generate-docs.sh
Expand Up @@ -23,18 +23,6 @@

# Exit on error.
set -e

echo ""
read -p "👋 Did you add a new top level export to src/index.ts? (y/n)? " -n 1 -r choice
if [ $choice == "y" ]
then
echo "\n🛑 You need to edit 'generate-docs.sh' and add that export to the --toc parameter"
echo "Then you can re-run this script!"
exit 1
else
echo "\n👍 You're all good! Carry on!"
fi

PKG_NAME=$1
ORG_NAME="tensorflow"

Expand All @@ -50,6 +38,7 @@ tsconfig="tsconfig.json"

urlPrefix="https://github.com/${ORG_NAME}/magenta-js/tree/master/${PKG_NAME}/src/"
keepAfter="/src/"
specialToc=""

if [ $PKG_NAME == "image" ]
then
Expand All @@ -58,7 +47,19 @@ then
keepAfter="/arbitrary_stylization/"
elif [ $PKG_NAME == "music" ]
then
echo ""
read -p "👋 Did you add a new top level export to src/index.ts? (y/n)? " -n 1 choice
if [ $choice == "y" ]
then
echo "\n🛑 You need to edit 'generate-docs.sh' and add that export to the --toc parameter"
echo "Then you can re-run this script!"
exit 1
else
echo "\n👍 You're all good! Carry on!"
fi

tsconfig="tsconfig.es6.json"
specialToc="--toc core,protobuf,coconet,music_rnn,music_vae,piano_genie,protobuf,transcription,gansynth"
fi

# Generate the docs.
Expand All @@ -70,7 +71,7 @@ npx typedoc src --out $tmpDir \
--includeVersion --includeDeclarations \
--excludePrivate --excludeExternals --excludeNotExported \
--exclude '**/*+(index|test|lib).ts' \
--toc core,protobuf,coconet,music_rnn,music_vae,piano_genie,protobuf,transcription,gansynth
${specialToc}

# The toc argument above contains exactly the list of exports in src/index.ts.
# This reduces the number of globas we're displaying in the side bar, which
Expand Down

0 comments on commit dc42a55

Please sign in to comment.