From 60d0ad070e6a3c2cb3d9f3833bc05ecdfaadbdb7 Mon Sep 17 00:00:00 2001 From: DallonF Date: Tue, 20 Nov 2012 12:01:13 -0700 Subject: [PATCH] Updated history --- HISTORY.md | 7 +++++++ lib/util/extendable.js | 1 + 2 files changed, 8 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 35e18e1..a4fd07f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,5 +5,12 @@ ### Breaking Changes ### New Features +- New utilities for extending Resource Types. + - Added `Resource.extend("ResourceName", { /* members */ })` syntax for extending Resources. The `init()` function is used as a constructor. The old `util.inherits()` syntax will continue to work. + - Moved `Resource` base class to the exports of the deployd module. You can now use `require('deployd').Resource` instead of `require('deployd/lib/resource')`. + - Added `get(ctx, next)`, `post(ctx, next)`, `put(ctx, next)`, and `del(ctx, next)` utility functions on `Resource`. You can now override those instead of `handle()`. +- New `Module` type in extension API + - Modules can define multiple Resource Types with `this.addResourceType()` + - [TODO] Modules can register their own dashboards. ### Major Bugfixes \ No newline at end of file diff --git a/lib/util/extendable.js b/lib/util/extendable.js index 81b703c..2ccfa38 100644 --- a/lib/util/extendable.js +++ b/lib/util/extendable.js @@ -18,6 +18,7 @@ module.exports = function(parent) { constructor.prototype[k] = child[k]; }); + module.exports(constructor); return constructor; }; }; \ No newline at end of file