Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit c0264496fba086a25164413e2bbfa41e89244bd2 @davidaurelio davidaurelio committed Jul 9, 2012
Showing 331 changed files with 37,313 additions and 0 deletions.
@@ -0,0 +1,9 @@
+.project
+.DS_Store
+.idea
+*.idea
+dist
+jsdoc
+node_modules
+tmp
+lib/r.js
@@ -0,0 +1,10 @@
+Jens Arps <arps@uxebu.com>
+David Aurelio <aurelio@uxebu.com>
+John-David Dalton <dalton@uxebu.com>
+Tobias von Klipstein <klipstein@uxebu.com>
+Wolfram Kriesing <kriesing@uxebu.com>
+Nikolai Onken <onken@uxebu.com>
+James Padolsey <padolsey@uxebu.com>
+Tobias Reiss <reiss@uxebu.com>
+Stephan Seidt <seidt@uxebu.com>
+Peter van der Zee <zee@uxebu.com>
@@ -0,0 +1,20 @@
+Copyright 2012 uxebu Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,145 @@
+# ** MODIFY THIS FILE AS REQUIRED **
+# ** ADD CUSTOM BUILD- & TEST-EXECUTION-COMMANDS HERE **
+#
+# Building & testing for development and CI environment
+#
+# Following binaries need to be installed and available in your PATH:
+#
+# * jsdoc
+# * jshint
+# * phantomjs
+# * jscoverage-server
+# * node
+#
+# CI-Tools (https://github.com/uxebu/ci-tools) need to be installed in:
+#
+# /opt/ci-tools
+#
+# The Jenkins-CI environment is executing the task `ci-run`:
+#
+# make ci-run
+
+ifndef TEST_RUNNER
+ # CHANGE HERE, IF THE DEFAULT TEST-RUNNER IS SOMEWHERE ELSE
+ TEST_RUNNER=test/runner.html
+ TEST_RUNNER_COMPARE=test/runner-compare.html
+ TEST_RUNNER_QC=test/runner-qc.html
+ TEST_RUNNER_BUILD=test/runner-build.html
+endif
+
+ifndef WORKSPACE
+ WORKSPACE=${CURDIR}
+endif
+
+ifndef PROJECT_NAME
+ PROJECT_NAME = $(shell basename ${WORKSPACE})
+endif
+
+CURRENT_USER = $(shell whoami)
+
+ifndef BASE_URL
+ BASE_URL=http://localhost/${CURRENT_USER}/${PROJECT_NAME}
+endif
+
+ifdef JOB_URL
+ # jenkins env URL params end with "/"
+ BASE_URL=${JOB_URL}ws
+endif
+
+ifdef GIT_BRANCH
+ SUB_DIR=/${shell echo ${GIT_BRANCH} | sed "s/origin\///"}
+endif
+
+# You can install the CI-Tools on your machine: https://github.com/uxebu/ci-tools
+ifndef CI_TOOLS_DIR
+ CI_TOOLS_DIR=/opt/ci-tools
+endif
+
+ifndef TEMP_DIR
+ TEMP_DIR=${WORKSPACE}/tmp
+endif
+
+ifndef DIST_DIR
+ DIST_DIR=${WORKSPACE}/dist
+endif
+
+CLOSURE=java -jar lib/closure/compiler.jar
+CLOSURE_AMD=${CLOSURE} \
+ --transform_amd_modules \
+ --process_common_js_modules \
+ --common_js_module_path_prefix src \
+ --output_wrapper '(function(){%output%}());'
+CLOSURE_FINALIZE=${CLOSURE}
+CLOSURE_PRETTY=${CLOSURE} --formatting PRETTY_PRINT --compilation_level WHITESPACE_ONLY
+
+default: build
+
+jshint: mktemp
+ - jshint ${WORKSPACE}/src/ --config config/jshint.json > ${TEMP_DIR}/jshint-report.txt
+
+coverage: mktemp
+ ${CI_TOOLS_DIR}/bin/coverage_phantom.sh ${TEST_RUNNER} ${WORKSPACE}
+
+test: mktemp
+ phantomjs --load-plugins=yes ${CI_TOOLS_DIR}/script/phantom_runner.js ${BASE_URL}/${TEST_RUNNER_BUILD} ${TEMP_DIR} 1 jasmine | grep -q "Testcase passed"
+ phantomjs --load-plugins=yes ${CI_TOOLS_DIR}/script/phantom_runner.js ${BASE_URL}/${TEST_RUNNER} ${TEMP_DIR} 0 jasmine
+ phantomjs --load-plugins=yes ${CI_TOOLS_DIR}/script/phantom_runner.js ${BASE_URL}/${TEST_RUNNER_COMPARE} ${TEMP_DIR} 0 jasmine
+ phantomjs --load-plugins=yes ${CI_TOOLS_DIR}/script/phantom_runner.js ${BASE_URL}/${TEST_RUNNER_QC} ${TEMP_DIR} 0 qc
+
+syntux-diff: mktemp
+ ${CI_TOOLS_DIR}/bin/syntux_diff.sh ${WORKSPACE}/src ${TEMP_DIR}
+
+profile: mktemp
+ cd ${WORKSPACE}/example/profiling && npm install
+ - ${WORKSPACE}/example/profiling/run.js \
+ -b ${BUILD_NUMBER} \
+ -d 10000 \
+ -e ${BASE_URL}/test/bonsai_executor_src.html \
+ -j ${JOB_NAME} \
+ -r http://riak.ux:8098/riak/profile \
+ ${WORKSPACE}/test/profile \
+
+doc: mkjsdoc
+ jsdoc -r -d ${WORKSPACE}/jsdoc${SUB_DIR} ${WORKSPACE}/src || true
+
+build: clean mkdist
+ ${CLOSURE_AMD} --common_js_entry_module bootstrapper/_build/worker.js \
+ src/bootstrapper/_build/worker.js \
+ `find src -name '*.js' -not -path 'src/bootstrapper/_dev/*' -not -path 'src/bootstrapper/_build/*' -not -path 'src/bootstrapper/context/socketio/*' -not -path 'src/bootstrapper/context/iframe/*' -not -path 'src/bootstrapper/context/node/*'` | ${CLOSURE_PRETTY} > ${DIST_DIR}/bonsai.js
+ echo "/*" > ${DIST_DIR}/bonsai.min.js
+ cat ${WORKSPACE}/LICENSE >> ${DIST_DIR}/bonsai.min.js
+ echo "*/" >> ${DIST_DIR}/bonsai.min.js
+ cat ${DIST_DIR}/bonsai.js | ${CLOSURE_FINALIZE} >> ${DIST_DIR}/bonsai.min.js
+ ${CLOSURE_AMD} --common_js_entry_module bootstrapper/_build/iframe.js \
+ src/bootstrapper/_build/iframe.js \
+ `find src -name '*.js' -not -path 'src/bootstrapper/_dev/*' -not -path 'src/bootstrapper/_build/*' -not -path 'src/bootstrapper/context/socketio/*' -not -path 'src/bootstrapper/context/worker/*' -not -path 'src/bootstrapper/context/node/*'` | ${CLOSURE_PRETTY} > ${DIST_DIR}/bonsai.iframe.js
+ echo "/*" > ${DIST_DIR}/bonsai.iframe.min.js
+ cat ${WORKSPACE}/LICENSE >> ${DIST_DIR}/bonsai.iframe.min.js
+ echo "*/" >> ${DIST_DIR}/bonsai.iframe.min.js
+ cat ${DIST_DIR}/bonsai.iframe.js | ${CLOSURE_FINALIZE} >> ${DIST_DIR}/bonsai.iframe.min.js
+
+preview-bundle: build
+ mkdir -p ${TEMP_DIR}/preview-bundle/lib
+ mkdir -p ${TEMP_DIR}/preview-bundle/example
+ mkdir -p ${TEMP_DIR}/preview-bundle/dist
+ cp -R example/library ${TEMP_DIR}/preview-bundle/example
+ - rm ${TEMP_DIR}/preview-bundle/example/library/movies/assets/*.mp4
+ - rm ${TEMP_DIR}/preview-bundle/example/library/movies/assets/*.m4v
+ - rm ${TEMP_DIR}/preview-bundle/example/library/movies/assets/*.ogv
+ cp -R dist/*.min.js ${TEMP_DIR}/preview-bundle/dist
+ cp -R lib/requirejs ${TEMP_DIR}/preview-bundle/lib
+ cd ${TEMP_DIR} && tar czf bonsai-preview.tgz preview-bundle/
+
+mktemp:
+ mkdir -p ${TEMP_DIR}
+
+mkdist:
+ mkdir -p ${DIST_DIR}
+
+mkjsdoc:
+ mkdir -p ${WORKSPACE}/jsdoc
+
+clean:
+ rm -rf ${TEMP_DIR} ${DIST_DIR}
+
+ci-run: clean build test coverage syntux-diff doc jshint profile
@@ -0,0 +1,5 @@
+# Bonsai
+
+*The art of bonsai tells a story through living illusion*
+
+(more information coming soon!)
@@ -0,0 +1,73 @@
+{
+ // Settings
+ "passfail" : false, // Stop on first error.
+ "maxerr" : 500, // Maximum error before stopping.
+
+
+ // Predefined globals whom JSHint will ignore.
+ "browser" : true, // Standard browser globals e.g. `window`, `document`.
+
+ "node" : true,
+ "rhino" : false,
+ "couch" : false,
+ "wsh" : false,
+
+ "jquery" : true,
+ "prototypejs" : false,
+ "mootools" : false,
+ "dojo" : false,
+
+ "predef" : [ // Custom globals.
+ // phantomjs globals
+ "WebPage",
+ "phantom"
+ ],
+
+
+ // Development.
+ "debug" : false, // Allow debugger statements e.g. browser breakpoints.
+ "devel" : false, // Allow developments statements e.g. `console.log();`.
+
+
+ // ECMAScript 5.
+ "es5" : true, // Allow ECMAScript 5 syntax.
+ "strict" : false, // Require `use strict` pragma in every file.
+ "globalstrict" : false, // Allow global "use strict" (also enables 'strict').
+
+
+ // The Good Parts.
+ "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
+ "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
+ "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
+ "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
+ "curly" : true, // Require {} for every new block or scope.
+ "eqeqeq" : false, // Require triple equals i.e. `===`.
+ "eqnull" : false, // Tolerate use of `== null`.
+ "evil" : false, // Tolerate use of `eval`.
+ "expr" : false, // Tolerate `ExpressionStatement` as Programs.
+ "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
+ "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
+ "latedef" : true, // Prohipit variable use before definition.
+ "loopfunc" : false, // Allow functions to be defined within loops.
+ "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
+ "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
+ "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
+ "scripturl" : true, // Tolerate script-targeted URLs.
+ "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
+ "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
+ "undef" : true, // Require all non-global variables be declared before they are used.
+
+
+ // Personal styling preferences.
+ "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
+ "noempty" : true, // Prohibit use of empty blocks.
+ "nonew" : true, // Prohibit use of constructors for side-effects.
+ "nomen" : true, // Prohibit use of initial or trailing underbars in names.
+ "onevar" : false, // Allow only one `var` statement per function.
+ "plusplus" : false, // Prohibit use of `++` & `--`.
+ "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
+ "trailing" : true, // Prohibit trailing whitespaces.
+ "white" : false, // Check against strict whitespace and indentation rules.
+ "indent" : 2 // Specify indentation spacing
+}
+
Oops, something went wrong.

0 comments on commit c026449

Please sign in to comment.