diff --git a/History.md b/History.md index 94cb8ed..53ce0d1 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,9 @@ # Changes # +## 1.1.0 / 2015-06-21 + - Fixed #15: Added legacy `.new()` function + - Fixed deprecated warning on package.json + ## 1.0.2 / 2015-04-07 - Fixed #16: instances properties defined through objects are not mutable diff --git a/Readme.md b/Readme.md index dee3437..50880b8 100644 --- a/Readme.md +++ b/Readme.md @@ -1,36 +1,43 @@ -# selfish # +# selfish [![Build Status](https://secure.travis-ci.org/Gozala/selfish.png)](http://travis-ci.org/Gozala/selfish) Class-free, pure prototypal multiple inheritance that lets you write expressive, well-structured code. -## Install ## +## Install -### server-side ### +### server-side - npm install selfish - -### client-side ### +```bash +npm install selfish +``` - bower install selfish +### client-side +```bash +bower install selfish +``` -## Require ## +## Require -### server-side ### +### server-side - var Base = require('!raw.github.com/Gozala/selfish/v1.0.0/selfish').Base +```js +var Base = require('!raw.github.com/Gozala/selfish/v1.0.0/selfish').Base +``` -### client-side RequireJS ### +### client-side RequireJS - define(['path/to/selfish'], function(selfish) { - var Base = selfish.Base; - } +```js +define(['path/to/selfish'], function(selfish) { + var Base = selfish.Base; +}) +``` -## Examples ## +## Examples -### Basics ### +### Basics ```js // Instead of creating classes, you create prototype objects. Let's look @@ -81,7 +88,7 @@ pet.call('Benzy') // 'Ruff! Ruff!' ``` -### Object composition ### +### Object composition ```js // In some programs recombining reusable pieces of code is a better option: @@ -142,10 +149,10 @@ pink.yellow() // 0.2039 pink.cyan() // 0.0000 ``` -### Combining composition & inheritance ### +### Combining composition & inheritance ```js -var pixel = new Pixel(11, 23, 'CC3399') +var Pixel = Color.extend({ initialize: function initialize(x, y, color) { Color.initialize.call(this, color) this.x = x @@ -156,7 +163,7 @@ var pixel = new Pixel(11, 23, 'CC3399') } }) -var pixel = Pixel.new(11, 23, 'CC3399') +var pixel = new Pixel(11, 23, 'CC3399') pixel.toString() // 11:23@#CC3399 Pixel.prototype.isPrototypeOf(pixel) // true @@ -168,7 +175,7 @@ Color.prototype.isPrototypeOf(pixel) // true Color.prototype.isPrototypeOf(Pixel.prototype) // true ``` -### TODO ### +### TODO This is a list of things I may introduce in newer versions. diff --git a/bower.json b/bower.json index dee8963..6be3790 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "selfish", "main": "selfish.js", - "version": "1.0.2", + "version": "1.1.0", "homepage": "https://github.com/Gozala/selfish", "authors": [ "Irakli Gozalishvili (http://jeditoolkit.com)", diff --git a/package.json b/package.json index 1769182..dabb97b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "selfish", "id": "selfish", - "version": "1.0.2", + "version": "1.1.0", "description": "Class-free, pure prototypal multiple inheritance", "keywords": [ "oop", @@ -67,10 +67,5 @@ "scripts": { "test": "./node_modules/.bin/mocha" }, - "licenses": [ - { - "type": "MIT", - "url": "http://jeditoolkit.com/LICENSE" - } - ] + "license": "MIT" }