-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructured repo file layout. Added build script with Javascript min…
…ification. Minification reduces Chatmore js files from 147KiB to 57KiB. Gzip brings it to 13KiB. Build script located in scripts dir.
- Loading branch information
Shawn Poulson
committed
Mar 14, 2012
1 parent
aa07ea8
commit 3e11aab
Showing
49 changed files
with
63 additions
and
35 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
tmp/*.db | ||
tmp/*.log | ||
tmp/*.sock | ||
build/* | ||
src/obj/* | ||
src/tmp/*.db | ||
src/tmp/*.log | ||
src/tmp/*.sock |
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
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,22 @@ | ||
#!/bin/sh | ||
|
||
pushd `dirname $0` | ||
|
||
BUILD_DIR=../build | ||
SRC_DIR=../src | ||
OBJ_DIR=$SRC_DIR/obj | ||
|
||
# Clean build dir. | ||
if [ ! -d $BUILD_DIR ]; then mkdir $BUILD_DIR; fi | ||
rm -rf $BUILD_DIR/* | ||
|
||
# Minify javascript. | ||
./minify.sh | ||
|
||
# Copy src files. | ||
rsync -av $SRC_DIR/* $BUILD_DIR --exclude=chatmore*.js --exclude=obj | ||
|
||
# Copy minified output. | ||
cp -a $OBJ_DIR/chatmoreAll.min.js $BUILD_DIR | ||
|
||
popd |
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,20 @@ | ||
#!/bin/sh | ||
|
||
pushd `dirname $0` | ||
|
||
TOOLS_DIR=../tools | ||
SRC_DIR=../src | ||
OBJ_DIR=$SRC_DIR/obj | ||
|
||
if [ ! -f $OBJ_DIR ]; then mkdir $OBJ_DIR; fi | ||
|
||
# Minify each Chatmore component. | ||
java -jar $TOOLS_DIR/yuicompressor-2.4.7.jar --type js --charset UTF-8 -v $SRC_DIR/chatmoreState.js > $OBJ_DIR/chatmoreState.min.js | ||
java -jar $TOOLS_DIR/yuicompressor-2.4.7.jar --type js --charset UTF-8 -v $SRC_DIR/chatmore.js > $OBJ_DIR/chatmore.min.js | ||
java -jar $TOOLS_DIR/yuicompressor-2.4.7.jar --type js --charset UTF-8 -v $SRC_DIR/chatmoreUI.js > $OBJ_DIR/chatmoreUI.min.js | ||
java -jar $TOOLS_DIR/yuicompressor-2.4.7.jar --type js --charset UTF-8 -v $SRC_DIR/chatmoreUI.fullpage.js > $OBJ_DIR/chatmoreUI.fullpage.min.js | ||
|
||
# Combine all Chatmore scripts into chatmoreAll.min.js. | ||
cat $OBJ_DIR/chatmoreState.min.js $OBJ_DIR/chatmore.min.js $OBJ_DIR/chatmoreUI.min.js $OBJ_DIR/chatmoreUI.fullpage.min.js > $OBJ_DIR/chatmoreAll.min.js | ||
|
||
popd |
File renamed without changes.
File renamed without changes.
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.