forked from chrisouten/BrowserQuest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
394 changed files
with
34,703 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# Script to generate an optimized client build of BrowserQuest | ||
|
||
BUILDDIR="../client-build" | ||
PROJECTDIR="../client/js" | ||
CURDIR=$(pwd) | ||
|
||
|
||
echo "Deleting previous build directory" | ||
rm -rf $BUILDDIR | ||
|
||
echo "Building client with RequireJS" | ||
cd $PROJECTDIR | ||
node ../../bin/r.js -o build.js | ||
cd $CURDIR | ||
|
||
echo "Removing unnecessary js files from the build directory" | ||
find $BUILDDIR/js -type f -not \( -name "game.js" -o -name "home.js" -o -name "log.js" -o -name "require-jquery.js" -o -name "mapworker.js" -o -name "detect.js" -o -name "underscore.min.js" -o -name "text.js" \) -delete | ||
|
||
echo "Removing sprites directory" | ||
rm -rf $BUILDDIR/sprites | ||
|
||
echo "Removing config directory" | ||
rm -rf $BUILDDIR/config | ||
|
||
echo "Moving build.txt to current dir" | ||
mv $BUILDDIR/build.txt $CURDIR | ||
|
||
echo "Build complete" |
Oops, something went wrong.