Last active
February 21, 2019 06:08
-
-
Save seanpmaxwell/ec144820d40f0bcb5ac2da80fc01744f to your computer and use it in GitHub Desktop.
TypeScriptFullStackShell/util/buildForProd.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### Build BackEnd ### | |
# Remove existing production folder | |
rm -rf ./build/ | |
# Transpile .ts to .js | |
tsc --sourceMap false | |
### Bundle FrontEnd ### | |
# Create the directory for React | |
mkdir -p ./build/public/react/ | |
# Navigate to the react directory | |
cd ./src/public/react/demo-react | |
# Build React code | |
npm run build | |
# Rename the folder | |
mv build demo-react | |
# Move the contains to the build/ dir | |
mv demo-react ../../../../build/public/react/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment