-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better version management/compile script. Prepare examples folder str…
…ucture
- Loading branch information
TriBlade9
committed
Nov 26, 2014
1 parent
5628d70
commit 5fe9292
Showing
15 changed files
with
1,125 additions
and
6 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,2 +1,2 @@ | ||
*~ | ||
test/ | ||
*.geany |
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,8 +1,30 @@ | ||
cd src | ||
|
||
#Prepare directories | ||
rm -rf ../dist | ||
mkdir ../dist | ||
browserify CEWBS.js -o ../dist/CEWBS.js | ||
sed -i -e 's/var CEWBS/var CEWBS = window.CEWBS/g' ../dist/CEWBS.js | ||
uglifyjs ../dist/CEWBS.js -c -o ../dist/CEWBS.min.js | ||
cp CEWBS.js ../dist/CEWBS-commonjs.js | ||
|
||
##BROWSERIFY## | ||
#Build browserified edition with the version number | ||
browserify CEWBS.js -o ../dist/CEWBS-$1-debug.js | ||
|
||
#Set browserified debug edition's global variable | ||
sed -i -e 's/var CEWBS/var CEWBS = window.CEWBS/g' ../dist/CEWBS-$1-debug.js | ||
#Set browserified edition's version | ||
sed -i -e "s/%VERSION%/$1/g" ../dist/CEWBS-$1-debug.js | ||
|
||
#Build browserified, minified verison | ||
uglifyjs ../dist/CEWBS-$1-debug.js -c -o ../dist/CEWBS-$1.js | ||
|
||
##COMMONJS## | ||
#Copy and set version number for CommonJS edition | ||
cp CEWBS.js ../dist/CEWBS-$1-commonjs.js | ||
sed -i -e "s/%VERSION%/$1/g" ../dist/CEWBS-$1-commonjs.js | ||
|
||
#Copy meshers folder for CommonJS edition | ||
cp -rf meshers ../dist/meshers | ||
|
||
##FINALISE## | ||
#Finally copy new version to examples folder. | ||
cp ../dist/CEWBS-$1.js ../examples/lib/CEWBS.js | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.