Skip to content

Commit

Permalink
Initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
biggora committed Jan 4, 2013
1 parent dc35c40 commit da4117b
Show file tree
Hide file tree
Showing 31 changed files with 8,363 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
doc:
makedoc lib/abstract-class.js lib/schema.js lib/validatable.js -t "JugglingDB API docs"

test:
@ONLY=memory ./support/nodeunit/bin/nodeunit test/*_test.*

.PHONY: test
.PHONY: doc
24 changes: 24 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var fs = require('fs');
var path = require('path');

exports.Schema = require('./lib/schema').Schema;
exports.AbstractClass = require('./lib/abstract-class').AbstractClass;
exports.Validatable = require('./lib/validatable').Validatable;

exports.init = function (rw) {
if (typeof rw === 'string') {
railway.orm = exports;
} else {
rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass};
}
require('./lib/railway')(rw);
};

try {
if (process.versions.node < '0.6') {
exports.version = JSON.parse(fs.readFileSync(__dirname + '/package.json')).version;
} else {
exports.version = require('../package').version;
}
} catch (e) {}

Loading

0 comments on commit da4117b

Please sign in to comment.