Change build directory to dist and cleanup NPM scripts (#1500)

* Move the build path to `dist`

* mkdir dist if not exists

* Remove build from .gitignore

* Delete `dist/` before building and when cleaning
This commit is contained in:
ylemkimon
2018-07-24 01:46:15 +09:00
committed by Erik Demaine
parent b43ed4b645
commit 237986a7ca
8 changed files with 11 additions and 15 deletions

View File

@@ -109,7 +109,7 @@ sed -i.bak -E 's|"version": "[^"]+",|"version": "'$VERSION'",|' package.json
rm -f package.json.bak
# Build generated files and add them to the repository (for bower)
git clean -fdx build dist
git clean -fdx dist
npm run dist
sed -i.bak -E '/^\/dist\/$/d' .gitignore
rm -f .gitignore.bak
@@ -145,7 +145,7 @@ if [ ! -z "$NEXT_VERSION" ]; then
git commit -n -m "Bump $BRANCH to v$NEXT_VERSION-pre"
git push origin "$BRANCH"
# Go back to the tag which has build/katex.tar.gz and build/katex.zip
# Go back to the tag which has katex.tar.gz and katex.zip
git checkout "v$VERSION"
fi
@@ -153,7 +153,7 @@ echo ""
echo "The automatic parts are done!"
echo "Now all that's left is to create the release on github."
echo "Visit https://github.com/Khan/KaTeX/releases/new?tag=v$VERSION to edit the release notes"
echo "Don't forget to upload build/katex.tar.gz and build/katex.zip to the release!"
echo "Don't forget to upload katex.tar.gz and katex.zip to the release!"
if [[ ${DRY_RUN} ]]; then
echo ""