Permalink
Browse files

Updated build process.

  • Loading branch information...
1 parent a6f6e7d commit f3f41d2963c0753b90aed841a00722f3cc1b5385 @lannymcnie lannymcnie committed Jan 28, 2013
View
@@ -4,7 +4,7 @@ cd $(dirname "$0")
LCNAME="tweenjs"
echo -e "\r--- $LCNAME ---"
-echo -n "Please enter version number (x.x.x) ? defaults to 'NEXT' : "
+echo -n "Enter version number [x.x.x] [default: "NEXT"] "
read VERSION
echo -e "\r"
@@ -15,9 +15,8 @@ fi
while [ "$COPY" != "Y" ] || [ "$COPY" != "y" ] || [ "$COPY" != "n" ] || [ "$COPY" != "N" ] || [ "$COPY" == "" ]
do
-echo -n "Would you like to copy '${LCNAME}-${VERSION}.min.js' to 'lib' folder (y / n) ? defaults to 'y' : "
+echo -e "Would you like move [y/n] ?\n'${LCNAME}-${VERSION}.min.js' to lib folder & \n'${LCNAME}_docs-${VERSION}.zip' to docs folder [default: 'y']"
read COPY
-echo -e "\r"
if [ "$COPY" == "" ] || [ "$COPY" == "Y" ] || [ "$COPY" == "y" ]
then
@@ -28,20 +27,21 @@ if [ "$COPY" == "n" ] || [ "$COPY" == "N" ]
then
break;
fi
-done
+done
echo -n "Building $LCNAME version: $VERSION"
-node ./build.js --tasks=ALL --os=MAC --version=$VERSION -v # run the build
+node ./build.js --tasks=ALL --version=$VERSION -v # run the build
echo -e "\r"
if [ "$COPY" == "y" ] # spaces are important!
then
echo -n "'${LCNAME}-${VERSION}.min.js' was copied to 'lib' folder"
- mv -f "./output_min/${LCNAME}-${VERSION}.min.js" ../lib
-else
- echo -n "'${LCNAME}-${VERSION}.min.js' was copied to 'build/output' folder"
- mv -f "./output_min/${LCNAME}-${VERSION}.min.js" ./output
+ echo -e "\r"
+ mv -f "./output/${LCNAME}-${VERSION}.min.js" ../lib
+ echo -n "'${LCNAME}-${VERSION}.zip' was copied to 'docs' folder"
+ mv -f "./output/${LCNAME}_docs-${VERSION}.zip" ../docs
+ echo -e "\r"
+ echo -e "\r"
+
fi
-rm -rf "./output_min"
-echo -e "\r"
-echo -e "\r"
+
echo "--- Complete ---"
View
@@ -4,39 +4,38 @@ CD %~dp0
SET LCNAME=tweenjs
ECHO --- %LCNAME% ---
-SET /P VERSION=Please enter version number (x.x.x) defaults to 'NEXT' :
+SET /P VERSION=Please enter version number [x.x.x] defaults to 'NEXT' :
IF "%VERSION%"=="" SET VERSION=NEXT
ECHO.
-:While
-SET /P COPY=Would you like to copy '%LCNAME%-%VERSION%.min.js' [y/n] defaults to 'y' :
+
+:ASK
+ECHO Would you like to move [y/n] ?
+ECHO '%LCNAME%-%VERSION%.min.js' to lib folder &
+SET /P COPY='%LCNAME%_docs-%VERSION%.zip' to docs folder [default: 'y']
IF "%COPY%"=="" SET COPY=Y
+IF "%COPY%"=="y" SET COPY=Y
+IF "%COPY%"=="n" SET COPY=N
IF "%COPY%"=="Y" GOTO :Build
IF "%COPY%"=="N" GOTO :Build
-IF "%COPY%"=="y" GOTO :Build
-IF "%COPY%"=="n" GOTO :Build
-GOTO :While
+GOTO :ASK
:Build
ECHO.
ECHO Building %LCNAME% version: %VERSION%
-
-node ./build.js --tasks=ALL --os=PC --version=%VERSION% -v
-
-CD ./output_min
+node ./build.js --tasks=ALL --version=%VERSION% -v
ECHO.
-IF "%COPY%"=="N" GOTO :Default
-IF "%COPY%"=="n" GOTO :Default
+IF "%COPY%"=="N" GOTO :Wait
+CD output/
ECHO '%LCNAME%-%VERSION%.min.js' was copied to 'lib' folder
MOVE /Y "%LCNAME%-%VERSION%.min.js" "../../lib" > %temp%/deleteme.txt
-GOTO :Wait
-:Default
-ECHO '%LCNAME%-%VERSION%.min.js' was copied to 'build/output' folder
-MOVE /Y "%LCNAME%-%VERSION%.min.js" "../output" > %temp%/deleteme.txt
+ECHO.
+ECHO '%LCNAME%-%VERSION%.zip' was copied to 'docs' folder
+MOVE /Y "%LCNAME%_docs-%VERSION%.zip" "../../docs" > %temp%/deleteme.txt
+ECHO.
+CD ../
:Wait
-CD ../
-RMDIR /S /Q "output_min"
ECHO.
ECHO --- Complete ---
PAUSE
View
@@ -6,71 +6,66 @@ For building the compiled library and API documentation, we use a custom build s
Google Closure requires that Java is installed on the system.
View the "YUI Doc":http://developer.yahoo.com/yui/yuidoc/ page for more information.
-Google Closure is included in the repository, which makes it easier to run the build, and ensures that we don't have version mismatches between the source and the libraries.
+Google Closure is included in the repository, which makes it easier to run the build, and ensures that we don't have version mismatches between the source and the libraries.
+*Note* For PC users, please ensure that you have java installed on your machine. If not, go to http://www.java.com/ > Click: Free Java Download > Agree and Start Free Download.
+For compression of the documentation for Windows, we have provided 7-zip.exe found within the /tools directory.
+*Note* Run the installer(7z920.exe) and ensure the install destination is within tools sub-directory (ie. C:\build\tools\7-Zip).
+7-Zip is licensed under the GNU LGPL license, For more information please visit http://www.7-zip.org/
+
h2. Configuration
-In order to run the script, you must have "node.js":http://nodejs.org/ installed, along with the "wrench":https://github.com/ryanmcgrath/wrench-js and "optimist":https://github.com/substack/node-optimist modules and finally "yuidocs":https://github.com/yui/yuidoc/
+In order to run the script, you must have "node.js":http://nodejs.org/ installed (tested v0.8.16+), along with the "wrench":https://github.com/ryanmcgrath/wrench-js and "optimist":https://github.com/substack/node-optimist modules and finally "yuidocs":https://github.com/yui/yuidoc/
* "node.js":http://nodejs.org/
* "wrench module":https://github.com/ryanmcgrath/wrench-js
* "optimist module":https://github.com/substack/node-optimist
-* "yuidoc":https://github.com/yui/yuidoc/t
+* "yuidoc":https://github.com/yui/yuidoc/
+
-The easiest way to install the required modules is to first install "NPM":http://npmjs.org/ (node package manager) and then run:
+Once you have installed "node.js" the easiest way to install the required modules is to run the following through command line (Terminal / CMD):
+*Note* To avoid problems while running script we would recommended installing (wrench/optimist/yuidoc) to the parent directory of your project, or on your root directory.
<code>npm install wrench</code>
<code>npm install optimist</code>
<code>npm -g install yuidocjs</code>
-
-
h2. Building the Source
<pre><code>Build Task Manager
Usage
-node ./build.js [-v] [-h] [-l] --tasks=TASK [--version=DOC_VERSION] [--source=FILE] [--output=FILENAME.js]
+node ./build.js [-h] [-l] --tasks=TASK [--version=DOC_VERSION][--format=STANDARD]
Options:
- -v, --verbose Enable verbose output [boolean]
-l, --list List all available tasks [boolean]
-h, --help Display usage [boolean]
- --version Document build version number [string]
- --tasks Task to run [default: "all"]
- -s, --source Include specified file in compilation. Option can be specified multiple times for multiple files.
- -o, --output Name of minified JavaScript file. [default: (set in config properties)]
+ --version Build version number (x.x.x) [string] [default:"NEXT"]
+ --tasks Task to run options: [ALL, CLEAN, BUILDSOURCE, BUILDDOCS] [default: "ALL"]
+ --format Formatting minified JS :[STANDARD, PRETTY_PRINT] [string] [default: "STANDARD"]
</code></pre>
h3. Examples
h4. Build Source and Docs
-<code>./build.js --tasks=ALL --version=5</code>
+<code>node ./build.js --tasks=ALL --version=0.5.0</code>
h4. Build Source
-<code>./build.js --tasks=BUILDSOURCE</code>
+<code>node ./build.js --tasks=BUILDSOURCE</code>
h4. Build Docs
-<code>./build.js --tasks=BUILDDOCS --version=5</code>
-
-h4. Build Source and include external .js files and rename generated file
-
-<code>./build.js --tasks=BUILDSOURCE -s test.js -s test2.js -o mylib.js</code>
+<code>node ./build.js --tasks=BUILDDOCS --version=0.5.0</code>
h4. Clean Build Directories
-<code>./build.js --tasks=CLEAN</code>
-
-
-h2. Tagging the Release
+<code>node ./build.js --tasks=CLEAN</code>
-When a release is ready to tag, use the following git command:
+h4. Build Source with Pretty printing
-<pre><code>git tag -a release_v0.3.0
-git push --tags</code></pre>
+<code>node ./build.js --format=PRETTY_PRINT</code>
There is a good reference on tagging at
Oops, something went wrong.

0 comments on commit f3f41d2

Please sign in to comment.