Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

simplified file structure, removed intro and outro

  • Loading branch information...
commit 9fda0aff49ba80f8af621abc8a4e673e1697b8c3 1 parent 23fc01e
@millermedeiros authored
View
2  .gitignore
@@ -1,6 +1,6 @@
.tmp*
.project
-.settings
+.settings/
.DS_Store?
ehthumbs.db
View
5 .project
@@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
+ <buildCommand>
+ <name>com.aptana.ide.core.unifiedBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
View
14 build.xml
@@ -25,20 +25,16 @@
<format property="build.date" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
</tstamp>
- <concat destfile="${dist.dir}/${dist.name}" fixlastline="yes" eol="unix">
- <filelist dir="${src.dir}">
- <file name="intro.js" />
- <file name="signals.js" />
- <file name="SignalBinding.js" />
- <file name="Signal.js" />
- <file name="outro.js" />
- </filelist>
- </concat>
+ <copy file="${src.dir}/signals.js" tofile="${dist.dir}/${dist.name}" />
+ <loadfile property="SignalBinding.js" srcFile="${src.dir}/SignalBinding.js"/>
+ <loadfile property="Signal.js" srcFile="${src.dir}/Signal.js"/>
<replace file="${dist.dir}/${dist.name}">
<replacefilter token="::VERSION_NUMBER::" value="${version.number}" />
<replacefilter token="::BUILD_NUMBER::" value="${build.number}" />
<replacefilter token="::BUILD_DATE::" value="${build.date}" />
+ <replacefilter token="//::SignalBinding.js:://" value="${SignalBinding.js}" />
+ <replacefilter token="//::Signal.js:://" value="${Signal.js}" />
</replace>
<echo message="${dist.name} built." />
View
4 dev/build/build.number
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Sun Jan 30 01:55:10 EST 2011
-build.number=127
+#Fri Feb 18 18:33:11 EST 2011
+build.number=134
View
6 dev/src/Signal.js
@@ -1,4 +1,7 @@
-
+
+ // Signal --------------------------------------------------------
+ //================================================================
+
/**
* Custom event broadcaster
* <br />- inspired by Robert Penner's AS3 Signals.
@@ -13,7 +16,6 @@
this._bindings = [];
};
-
signals.Signal.prototype = {
/**
View
5 dev/src/SignalBinding.js
@@ -1,4 +1,7 @@
+ // SignalBinding -------------------------------------------------
+ //================================================================
+
/**
* Object that represents a binding between a Signal and a listener function.
* <br />- <strong>This is an internall constructor and shouldn't be called by regular user.</strong>
@@ -141,4 +144,4 @@
return '[SignalBinding isOnce: '+ this._isOnce +', isEnabled: '+ this._isEnabled +']';
}
- };
+ };
View
10 dev/src/intro.js
@@ -1,10 +0,0 @@
-/*jslint onevar:true, undef:true, newcap:true, regexp:true, bitwise:true, maxerr:50, indent:4, white:false, nomen:false, plusplus:false */
-
-/*!!
- * JS Signals <http://millermedeiros.github.com/js-signals/>
- * Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
- * @author Miller Medeiros <http://millermedeiros.com/>
- * @version ::VERSION_NUMBER::
- * @build ::BUILD_NUMBER:: (::BUILD_DATE::)
- */
-(function(window){
View
1  dev/src/outro.js
@@ -1 +0,0 @@
-}(this));
View
20 dev/src/signals.js
@@ -1,14 +1,28 @@
-
+/*jslint onevar:true, undef:true, newcap:true, regexp:true, bitwise:true, maxerr:50, indent:4, white:false, nomen:false, plusplus:false */
+
+/*!!
+ * JS Signals <http://millermedeiros.github.com/js-signals/>
+ * Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
+ * @author Miller Medeiros <http://millermedeiros.com/>
+ * @version ::VERSION_NUMBER::
+ * @build ::BUILD_NUMBER:: (::BUILD_DATE::)
+ */
+(function(window){
+
/**
* @namespace Signals Namespace - Custom event/messaging system based on AS3 Signals
* @name signals
*/
var signals = window.signals = {};
-
+
/**
* Signals Version Number
* @type string
* @const
*/
signals.VERSION = '::VERSION_NUMBER::';
-
+
+//::SignalBinding.js:://
+//::Signal.js:://
+
+}(this));
View
18 dist/js-signals.js
@@ -5,23 +5,26 @@
* Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
* @author Miller Medeiros <http://millermedeiros.com/>
* @version 0.5.1
- * @build 126 (01/30/2011 01:55 AM)
+ * @build 133 (02/18/2011 06:33 PM)
*/
(function(window){
-
+
/**
* @namespace Signals Namespace - Custom event/messaging system based on AS3 Signals
* @name signals
*/
var signals = window.signals = {};
-
+
/**
* Signals Version Number
* @type string
* @const
*/
signals.VERSION = '0.5.1';
+
+ // SignalBinding -------------------------------------------------
+ //================================================================
/**
* Object that represents a binding between a Signal and a listener function.
@@ -166,7 +169,10 @@
}
};
-
+
+ // Signal --------------------------------------------------------
+ //================================================================
+
/**
* Custom event broadcaster
* <br />- inspired by Robert Penner's AS3 Signals.
@@ -181,7 +187,6 @@
this._bindings = [];
};
-
signals.Signal.prototype = {
/**
@@ -385,4 +390,5 @@
}
};
-}(this));
+
+}(this));
View
2  dist/js-signals.min.js
@@ -3,6 +3,6 @@
* Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
* @author Miller Medeiros <http://millermedeiros.com/>
* @version 0.5.1
- * @build 126 (01/30/2011 01:55 AM)
+ * @build 133 (02/18/2011 06:33 PM)
*/
(function(c){var a=c.signals={};a.VERSION="0.5.1";function b(g,f,d,e){this._listener=f;this._isOnce=d;this.context=e;this._signal=g}b.prototype={_isEnabled:true,execute:function(d){var e;if(this._isEnabled){e=this._listener.apply(this.context,d);if(this._isOnce){this.detach()}}return e},detach:function(){return this._signal.remove(this._listener)},getListener:function(){return this._listener},dispose:function(){this.detach();this._destroy()},_destroy:function(){delete this._signal;delete this._isOnce;delete this._listener;delete this.context},disable:function(){this._isEnabled=false},enable:function(){this._isEnabled=true},isEnabled:function(){return this._isEnabled},isOnce:function(){return this._isOnce},toString:function(){return"[SignalBinding isOnce: "+this._isOnce+", isEnabled: "+this._isEnabled+"]"}};a.Signal=function(){this._bindings=[]};a.Signal.prototype={_shouldPropagate:true,_isEnabled:true,_registerListener:function(g,f,e){if(typeof g!=="function"){throw new Error("listener is a required param of add() and addOnce().")}var d=this._indexOfListener(g),h;if(d!==-1){h=this._bindings[d];if(h.isOnce()!==f){throw new Error("You cannot add"+(f?"":"Once")+"() then add"+(!f?"":"Once")+"() the same listener without removing the relationship first.")}}else{h=new b(this,g,f,e);this._addBinding(h)}return h},_addBinding:function(d){this._bindings.push(d)},_indexOfListener:function(d){var e=this._bindings.length;while(e--){if(this._bindings[e]._listener===d){return e}}return -1},add:function(e,d){return this._registerListener(e,false,d)},addOnce:function(e,d){return this._registerListener(e,true,d)},_removeByIndex:function(d){this._bindings[d]._destroy();this._bindings.splice(d,1)},remove:function(e){if(typeof e!=="function"){throw new Error("listener is a required param of remove().")}var d=this._indexOfListener(e);if(d!==-1){this._removeByIndex(d)}return e},removeAll:function(){var d=this._bindings.length;while(d--){this._removeByIndex(d)}},getNumListeners:function(){return this._bindings.length},disable:function(){this._isEnabled=false},enable:function(){this._isEnabled=true},isEnabled:function(){return this._isEnabled},halt:function(){this._shouldPropagate=false},dispatch:function(f){if(!this._isEnabled){return}var d=Array.prototype.slice.call(arguments),h=this._bindings.slice(),e,g=this._bindings.length;this._shouldPropagate=true;for(e=0;e<g;e++){if(h[e].execute(d)===false||!this._shouldPropagate){break}}},dispose:function(){this.removeAll();delete this._bindings},toString:function(){return"[Signal isEnabled: "+this._isEnabled+" numListeners: "+this.getNumListeners()+"]"}}}(this));
Please sign in to comment.
Something went wrong with that request. Please try again.