Permalink
Browse files

Added 'full' build

  • Loading branch information...
1 parent 7088fe8 commit b07d62f806bb7793efc7a4fee170673ab9f940bd @rgr-myrg committed May 8, 2011
Showing with 12 additions and 30 deletions.
  1. +8 −11 build.sh
  2. +0 −10 build/devshop.js
  3. +0 −5 examples/devshop.js
  4. +1 −1 examples/eventsignal.html
  5. +1 −1 examples/mvc.html
  6. +1 −1 examples/observer.html
  7. +1 −1 examples/singleton.html
View
19 build.sh
@@ -1,14 +1,10 @@
#!/bin/bash
#Build Script for http://DevShop.Me
-VERSION="0.1"
-ARTIFACT="devshop.js"
-JS_FILES="--js src/core.js --js src/singletonfactory.js --js src/observable.js --js src/observer.js --js src/eventsignal.js --js src/mvc.js"
-JS_BUILD="build/$ARTIFACT"
JS_TEMP="build/tmp.js"
EXAMPLE="examples/devshop.js"
LICENSE="LICENSE"
-PACKAGES=(eventsignal mvc observer singletonfactory);
+PACKAGES=(eventsignal mvc observer singletonfactory full);
echo -n "Compiling..."
@@ -34,17 +30,18 @@ do :
files="--js src/core.js --js src/singletonfactory.js"
;;
esac
+ case "$i" in
+ "full")
+ files="--js src/core.js --js src/singletonfactory.js --js src/observable.js --js src/observer.js --js src/eventsignal.js --js src/mvc.js"
+ ;;
+ esac
artifact="build/devshop-"$i".js"
java -jar lib/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS $files --js_output_file $JS_TEMP
cat $LICENSE $JS_TEMP > $artifact
- rm $temp
+ rm $JS_TEMP
done
-java -jar lib/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS $JS_FILES --js_output_file $JS_TEMP
-cat $LICENSE $JS_TEMP > $JS_BUILD
-echo -n "Created $JS_BUILD"
-cp -p $JS_TEMP $EXAMPLE
-rm $JS_TEMP
+cp -p build/devshop-full.js examples/devshop-full.js
if [ $? -ne 0 ]; then
exit 1
View
10 build/devshop.js
@@ -1,10 +0,0 @@
-/**
- * Copyright (c) 2011 Roger Myrg http://devshop.me/
- * Released under the MIT license:
- * https://github.com/rgr-myrg/DevShop-JS/raw/master/MIT-LICENSE
- */
-(function(){window.DevShop=typeof window.DevShop==="object"?window.DevShop:{};window.DevShop.Me=function(d){for(var b in d)d.hasOwnProperty(b)&&(window.DevShop[b]=d[b]);DevShop=devshop=window.DevShop}})();(function(){DevShop.Me({SingletonFactory:function(d){var b=function(a){if(typeof a==="function")try{return new a}catch(c){}else if(typeof a==="object")return a},e=b(d.implement),a=b(d.extend),b=b(d.instance),c;for(c in a)a.hasOwnProperty(c)&&(b[c]||(b[c]=a[c]));for(c in e)if(e.hasOwnProperty(c)&&!b[c])throw d.instance+" must implement '"+c+"' "+typeof e[c];if(typeof b.initialize==="function")try{b.initialize()}catch(h){}return b}})})();(function(){DevShop.Me({Observable:function(d){return DevShop.SingletonFactory({extend:function(){this.observers=[];this.addObserver=function(b){if((typeof b==="function"||typeof b==="object")&&typeof b.notify==="function")if(this.observers.push(b),typeof b.onRegister==="function")try{b.onRegister()}catch(d){}};this.notifyObservers=function(b){for(var d=this.observers.length,a=0;a<d;a++)try{this.observers[a].notify(b,this)}catch(c){}}},instance:d})}})})();(function(){DevShop.Me({Observer:function(d){return DevShop.SingletonFactory({extend:function(){this.onRegister=function(){};this.notify=function(b,d){this.observable=d;if(typeof this[b]==="function")try{this[b]()}catch(a){}}},instance:d})}})})();(function(){DevShop.Me({EventSignal:function(){var d=[];this.addListener=function(b){typeof b==="function"&&d.push(b)};this.removeListener=function(b){for(var e=d.length,a=0;a<e;a++)d[a]===b&&d.splice(a)};this.dispatch=function(){for(var b=d.length,e=0;e<b;e++)try{d[e].apply(this,arguments)}catch(a){}}}})})();(function(){DevShop.Me({ProxyInterface:{NAME:""},MediatorInterface:{NAME:"",listNotificationInterests:function(){},handleNotification:function(){}},CommandInterface:{execute:function(){}},Proxy:function(){var d={};this.facade=null;this.setData=function(b){d=b};this.getData=function(){return d};this.onRegister=function(){};this.onRemove=function(){}},Mediator:new DevShop.Observer(function(){this.facade=null;this.onRegister=function(){};this.onRemove=function(){}}),Facade:function(){var d=new function(){var a=
-{};this.facade={};this.registerProxy=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c);if(typeof c.onRegister==="function")c.onRegister()};this.retrieveProxy=function(c){return a[c]?a[c]:null};this.removeProxy=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null}},b=new DevShop.Observable(function(){var a={};this.facade={};this.notification={};this.registerMediator=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c,this.addObserver(c))};this.retrieveMediator=
-function(c){return a[c]?a[c]:null};this.removeMediator=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null};this.notifyObservers=function(a){for(var b=this.observers.length,d=0;d<b;d++)try{for(var e=this.observers[d].listNotificationInterests(),g=!1,f=0;l=e.length,f<l;f++)if(e[f]==this.notification.name){g=!0;break}if(g)this.observers[d].notification=this.notification,this.observers[d].notify(a,this)}catch(i){}};this.sendNotification=function(a){this.notification=
-a;this.notifyObservers("handleNotification")}}),e=new DevShop.Observer(function(){var a={},c=[];this.facade={};this.NAME="DevShop.Controller";this.registerCommand=function(b,d){d.facade=this.facade;a[b]||(a[b]=d,c.push(b))};this.listNotificationInterests=function(){return c};this.handleNotification=function(){var b=this.notification;if(typeof a[b.name]==="object"&&typeof a[b.name].execute==="function")try{a[b.name].execute(b)}catch(c){}}});this.CMD_STARTUP="CMD_STARTUP";this.registerProxy=function(a){d.registerProxy(a)};
-this.registerMediator=function(a){b.registerMediator(a)};this.registerCommand=function(a,b){e.registerCommand(a,b)};this.retrieveProxy=function(a){return d.retrieveProxy(a)};this.retrieveMediator=function(a){return b.retrieveMediator(a)};this.removeProxy=function(a){d.removeProxy(a)};this.removeMediator=function(a){b.removeMediator(a)};this.sendNotification=function(a,c,d){b.sendNotification({name:a,body:c,type:d})};this.initializeFacade=function(a){d.facade=a;b.facade=a;e.facade=a;a.registerMediator(e)}}})})();
View
5 examples/devshop.js
@@ -1,5 +0,0 @@
-(function(){window.DevShop=typeof window.DevShop==="object"?window.DevShop:{};window.DevShop.Me=function(d){for(var b in d)d.hasOwnProperty(b)&&(window.DevShop[b]=d[b]);DevShop=devshop=window.DevShop}})();(function(){DevShop.Me({SingletonFactory:function(d){var b=function(a){if(typeof a==="function")try{return new a}catch(c){}else if(typeof a==="object")return a},e=b(d.implement),a=b(d.extend),b=b(d.instance),c;for(c in a)a.hasOwnProperty(c)&&(b[c]||(b[c]=a[c]));for(c in e)if(e.hasOwnProperty(c)&&!b[c])throw d.instance+" must implement '"+c+"' "+typeof e[c];if(typeof b.initialize==="function")try{b.initialize()}catch(h){}return b}})})();(function(){DevShop.Me({Observable:function(d){return DevShop.SingletonFactory({extend:function(){this.observers=[];this.addObserver=function(b){if((typeof b==="function"||typeof b==="object")&&typeof b.notify==="function")if(this.observers.push(b),typeof b.onRegister==="function")try{b.onRegister()}catch(d){}};this.notifyObservers=function(b){for(var d=this.observers.length,a=0;a<d;a++)try{this.observers[a].notify(b,this)}catch(c){}}},instance:d})}})})();(function(){DevShop.Me({Observer:function(d){return DevShop.SingletonFactory({extend:function(){this.onRegister=function(){};this.notify=function(b,d){this.observable=d;if(typeof this[b]==="function")try{this[b]()}catch(a){}}},instance:d})}})})();(function(){DevShop.Me({EventSignal:function(){var d=[];this.addListener=function(b){typeof b==="function"&&d.push(b)};this.removeListener=function(b){for(var e=d.length,a=0;a<e;a++)d[a]===b&&d.splice(a)};this.dispatch=function(){for(var b=d.length,e=0;e<b;e++)try{d[e].apply(this,arguments)}catch(a){}}}})})();(function(){DevShop.Me({ProxyInterface:{NAME:""},MediatorInterface:{NAME:"",listNotificationInterests:function(){},handleNotification:function(){}},CommandInterface:{execute:function(){}},Proxy:function(){var d={};this.facade=null;this.setData=function(b){d=b};this.getData=function(){return d};this.onRegister=function(){};this.onRemove=function(){}},Mediator:new DevShop.Observer(function(){this.facade=null;this.onRegister=function(){};this.onRemove=function(){}}),Facade:function(){var d=new function(){var a=
-{};this.facade={};this.registerProxy=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c);if(typeof c.onRegister==="function")c.onRegister()};this.retrieveProxy=function(c){return a[c]?a[c]:null};this.removeProxy=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null}},b=new DevShop.Observable(function(){var a={};this.facade={};this.notification={};this.registerMediator=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c,this.addObserver(c))};this.retrieveMediator=
-function(c){return a[c]?a[c]:null};this.removeMediator=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null};this.notifyObservers=function(a){for(var b=this.observers.length,d=0;d<b;d++)try{for(var e=this.observers[d].listNotificationInterests(),g=!1,f=0;l=e.length,f<l;f++)if(e[f]==this.notification.name){g=!0;break}if(g)this.observers[d].notification=this.notification,this.observers[d].notify(a,this)}catch(i){}};this.sendNotification=function(a){this.notification=
-a;this.notifyObservers("handleNotification")}}),e=new DevShop.Observer(function(){var a={},c=[];this.facade={};this.NAME="DevShop.Controller";this.registerCommand=function(b,d){d.facade=this.facade;a[b]||(a[b]=d,c.push(b))};this.listNotificationInterests=function(){return c};this.handleNotification=function(){var b=this.notification;if(typeof a[b.name]==="object"&&typeof a[b.name].execute==="function")try{a[b.name].execute(b)}catch(c){}}});this.CMD_STARTUP="CMD_STARTUP";this.registerProxy=function(a){d.registerProxy(a)};
-this.registerMediator=function(a){b.registerMediator(a)};this.registerCommand=function(a,b){e.registerCommand(a,b)};this.retrieveProxy=function(a){return d.retrieveProxy(a)};this.retrieveMediator=function(a){return b.retrieveMediator(a)};this.removeProxy=function(a){d.removeProxy(a)};this.removeMediator=function(a){b.removeMediator(a)};this.sendNotification=function(a,c,d){b.sendNotification({name:a,body:c,type:d})};this.initializeFacade=function(a){d.facade=a;b.facade=a;e.facade=a;a.registerMediator(e)}}})})();
View
2 examples/eventsignal.html
@@ -5,7 +5,7 @@
<title>DevShop.Me :: Event Signal</title>
<style>
</style>
- <script type="text/javascript" src="devshop.js"></script>
+ <script type="text/javascript" src="devshop-full.js"></script>
<script type="text/javascript">
var Echo={
onKeyUp:function(msg){
View
2 examples/mvc.html
@@ -5,7 +5,7 @@
<title>DevShop.Me :: MVC Pattern</title>
<style>
</style>
- <script type="text/javascript" src="devshop.js"></script>
+ <script type="text/javascript" src="devshop-full.js"></script>
<script type="text/javascript">
var Echo={
onKeyUp:function(msg){
View
2 examples/observer.html
@@ -5,7 +5,7 @@
<title>DevShop.Me :: Observer Plus</title>
<style>
</style>
- <script type="text/javascript" src="devshop.js"></script>
+ <script type="text/javascript" src="devshop-full.js"></script>
<script type="text/javascript">
var Echo=new DevShop.Observer({
onKeyUp:function(){
View
2 examples/singleton.html
@@ -5,7 +5,7 @@
<title>DevShop.Me :: Singleton Factory</title>
<style>
</style>
- <script type="text/javascript" src="devshop.js"></script>
+ <script type="text/javascript" src="devshop-full.js"></script>
<script type="text/javascript">
//Create a single instance. Nothing fancy here.
var TheWiz=new DevShop.SingletonFactory({

0 comments on commit b07d62f

Please sign in to comment.