Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed dist files, closes #22. and updated npmignore to distribute a…

…ll version through npm, closes #23.
  • Loading branch information...
commit 1c56b5675f74eaf7c0bb5fdb09028c9ac68c9472 1 parent 54cb27d
@millermedeiros authored
View
5 .npmignore
@@ -1,5 +1,2 @@
dev/
-dist/js-signals.amd.js
-dist/js-signals.js
-dist/js-signals.min.js
-build.xml
+build.xml
View
10 README.markdown
@@ -24,10 +24,10 @@ For a more in-depth introduction read the [JS-Signals Project Page](http://mille
Files inside `dist` folder.
* docs/index.html : Documentation.
- * js-signals.js : Uncompressed source code with comments.
- * js-signals.amd.js : Uncompressed source code wrapped as an [asynchronous module](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition) to be used together with [RequireJS](http://requirejs.org/).
- * js-signals.cjs.js : Uncompressed source code wrapped as an [CommonJS module](http://wiki.commonjs.org/wiki/Modules/1.1) to be used on [nodejs](http://nodejs.org/) or any other environment that supports CommonJS modules.
- * js-signals.min.js : Compressed code.
+ * signals.js : Uncompressed source code with comments.
+ * signals.amd.js : Uncompressed source code wrapped as an [asynchronous module](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition) to be used together with [RequireJS](http://requirejs.org/).
+ * signals.cjs.js : Uncompressed source code wrapped as an [CommonJS module](http://wiki.commonjs.org/wiki/Modules/1.1) to be used on [nodejs](http://nodejs.org/) or any other environment that supports CommonJS modules.
+ * signals.min.js : Compressed code.
You can install JS-Signals on Node.js using [NPM](http://npmjs.org/)
@@ -61,4 +61,4 @@ This project uses [Apache Ant](http://ant.apache.org/) for the build process. If
This will delete all JS files inside the `dist` folder, merge/update/compress source files, validate generated code using [JSLint](http://www.jslint.com/) and copy the output to the `dist` folder.
-**IMPORTANT:** `dist` folder always contain the latest version, regular users should **not** need to run build task.
+**IMPORTANT:** `dist` folder always contain the latest version, regular users should **not** need to run build task.
View
4 dev/build/build.number
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Tue May 03 01:20:15 BRT 2011
-build.number=180
+#Tue Jun 07 01:13:26 BRT 2011
+build.number=181
View
2  dev/build/build.properties
@@ -10,7 +10,7 @@ yuicompressor.jar = ${build.dir}/yuicompressor/yuicompressor-2.4.2.jar
jslint.jar = ${build.dir}/jslint4java/jslint4java-1.4.6.jar
yuitest-coverage.jar = ${build.dir}/yuitest-coverage/yuitest-coverage-0.5.5.jar
yuitest-coverage-report.jar = ${build.dir}/yuitest-coverage/yuitest-coverage-report-0.5.5.jar
-product.name = js-signals
+product.name = signals
version.number = 0.6.1
dist.name = ${product.name}.js
dist.amd.name = ${product.name}.amd.js
View
2  dist/js-signals.amd.js → dist/signals.amd.js
@@ -6,7 +6,7 @@
* Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
* @author Miller Medeiros <http://millermedeiros.com/>
* @version 0.6.1
- * @build 179 (05/03/2011 01:20 AM)
+ * @build 180 (06/07/2011 01:13 AM)
*/
define(function(){
View
2  dist/js-signals.cjs.js → dist/signals.cjs.js
@@ -6,7 +6,7 @@
* Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
* @author Miller Medeiros <http://millermedeiros.com/>
* @version 0.6.1
- * @build 179 (05/03/2011 01:20 AM)
+ * @build 180 (06/07/2011 01:13 AM)
*/
/**
View
2  dist/js-signals.js → dist/signals.js
@@ -6,7 +6,7 @@
* Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
* @author Miller Medeiros <http://millermedeiros.com/>
* @version 0.6.1
- * @build 179 (05/03/2011 01:20 AM)
+ * @build 180 (06/07/2011 01:13 AM)
*/
(function(global){
View
2  dist/js-signals.min.js → dist/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.6.1
- * @build 179 (05/03/2011 01:20 AM)
+ * @build 180 (06/07/2011 01:13 AM)
*/
(function(c){var a={VERSION:"0.6.1"};function b(h,g,e,f,d){this._listener=g;this._isOnce=e;this.context=f;this._signal=h;this._priority=d||0}b.prototype={active:true,execute:function(d){var e;if(this.active){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},isOnce:function(){return this._isOnce},toString:function(){return"[SignalBinding isOnce: "+this._isOnce+", active: "+this.active+"]"}};a.Signal=function(){this._bindings=[]};a.Signal.prototype={_shouldPropagate:true,active:true,_registerListener:function(h,g,f,e){if(typeof h!=="function"){throw new Error("listener is a required param of add() and addOnce() and should be a Function.")}var d=this._indexOfListener(h),i;if(d!==-1){i=this._bindings[d];if(i.isOnce()!==g){throw new Error("You cannot add"+(g?"":"Once")+"() then add"+(!g?"":"Once")+"() the same listener without removing the relationship first.")}}else{i=new b(this,h,g,f,e);this._addBinding(i)}return i},_addBinding:function(d){var e=this._bindings.length;do{--e}while(this._bindings[e]&&d._priority<=this._bindings[e]._priority);this._bindings.splice(e+1,0,d)},_indexOfListener:function(d){var e=this._bindings.length;while(e--){if(this._bindings[e]._listener===d){return e}}return -1},add:function(f,e,d){return this._registerListener(f,false,e,d)},addOnce:function(f,e,d){return this._registerListener(f,true,e,d)},remove:function(e){if(typeof e!=="function"){throw new Error("listener is a required param of remove() and should be a Function.")}var d=this._indexOfListener(e);if(d!==-1){this._bindings[d]._destroy();this._bindings.splice(d,1)}return e},removeAll:function(){var d=this._bindings.length;while(d--){this._bindings[d]._destroy()}this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=false},dispatch:function(e){if(!this.active){return}var d=Array.prototype.slice.call(arguments),g=this._bindings.slice(),f=this._bindings.length;this._shouldPropagate=true;do{f--}while(g[f]&&this._shouldPropagate&&g[f].execute(d)!==false)},dispose:function(){this.removeAll();delete this._bindings},toString:function(){return"[Signal active: "+this.active+" numListeners: "+this.getNumListeners()+"]"}};c.signals=a}(window||global||this));
Please sign in to comment.
Something went wrong with that request. Please try again.