Comparing version 0.1.0 to 0.1.1
@@ -187,3 +187,4 @@ /* | ||
'@talents' : require('./processor/annotation/Traits'), | ||
'@annotation' : require('./processor/annotation/Annotation') | ||
'@annotation' : require('./processor/annotation/Annotation'), | ||
'@exports' : require('./processor/annotation/Exports') | ||
}; | ||
@@ -190,0 +191,0 @@ |
@@ -34,17 +34,17 @@ /* | ||
if(parent && parent.prototype){ | ||
sp = Object.create(parent.prototype); | ||
// if(parent && parent.prototype){ | ||
sp = Object.create(parent.prototype); | ||
sp.$super = parent; | ||
sp.$super = parent; | ||
sp.callSuper = function(methodName){ | ||
var mthd = this.$super.prototype[methodName], | ||
mthdArgs = Array.prototype.slice.call(arguments, 1); | ||
if(mthd){ | ||
return mthd.apply(this, mthdArgs); | ||
} | ||
}; | ||
subject.prototype = sp; | ||
sp.callSuper = function(methodName){ | ||
var mthd = this.$super.prototype[methodName], | ||
mthdArgs = Array.prototype.slice.call(arguments, 1); | ||
if(mthd){ | ||
return mthd.apply(this, mthdArgs); | ||
} | ||
}; | ||
subject.prototype = sp; | ||
} | ||
} | ||
// } | ||
@@ -51,0 +51,0 @@ }; |
@@ -20,5 +20,4 @@ /* | ||
setParameter: function(value){ | ||
if( !(value instanceof Object) ){ | ||
console.warn('@properties parameter should be an Object'); | ||
return; | ||
if( value instanceof Array || !(value instanceof Object) ){ | ||
throw new Error('@properties parameter should be an Object'); | ||
} | ||
@@ -25,0 +24,0 @@ this._value = value; |
@@ -46,4 +46,9 @@ /* | ||
ANNOTATION : 1000, | ||
POST_ANNOTATION : 1001 | ||
POST_ANNOTATION : 1001, | ||
PRE_EXPORTS : 1009, | ||
EXPORTS : 1010, | ||
POST_EXPORTS : 1011 | ||
}; | ||
{ | ||
"name": "cocktail", | ||
"description": "CocktailJS is a small library to explore traits, talents, inheritance and annotations concepts in nodejs - Shake your objects and classes with Cocktail!", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "http://cocktailjs.github.io", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -1,2 +0,4 @@ | ||
# Cocktail JS [![Build Status](https://travis-ci.org/CocktailJS/Cocktail.png?branch=master)](https://travis-ci.org/CocktailJS/Cocktail) | ||
# Cocktail JS | ||
[![Build Status](https://travis-ci.org/CocktailJS/Cocktail.png?branch=master)](https://travis-ci.org/CocktailJS/Cocktail) | ||
[![NPM version](https://badge.fury.io/js/cocktail.png)](http://badge.fury.io/js/cocktail) | ||
@@ -52,7 +54,33 @@ Cocktail is a small but yet powerful library with very simple principles: | ||
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). | ||
### Running Tests | ||
Add your unit and/or integration tests and execute | ||
$ grunt test | ||
### Before Commiting | ||
Run grunt to check lint and execute tests | ||
$ grunt | ||
### Check test code coverage with instanbul | ||
Install instanbul from npm globally if you don't have it already installed | ||
$ npm install -g istanbul | ||
Run | ||
$ istanbul cover _mocha -- -u exports --recursive test | ||
## Release History | ||
- 0.1.0 (current master) | ||
- 0.1.1 (current master) | ||
- status: Alpha | ||
- Added `@exports` annotation. | ||
- Documentation update. | ||
- Tests for @exports annotation. | ||
- 0.1.0 | ||
- status: Alpha | ||
- Added sequence to define custom annotations priorities. | ||
@@ -59,0 +87,0 @@ - Documentation update. |
301036
32
634
112