Permalink
Browse files

to bike

  • Loading branch information...
1 parent b54bdd7 commit 772c5e2cd5721579aa1d4260b829f73dd572c94d @gabrieleds gabrieleds committed Jun 14, 2012
View
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/*!
- * Behere
+ * Bike
* Copyright(c) 2012 Gabriele Di Stefano <gabriele.ds@gmail.com>
* MIT Licensed
*/
@@ -1,5 +1,5 @@
/*!
- * Help
+ * Bike
* Copyright(c) 2012 Gabriele Di Stefano <gabriele.ds@gmail.com>
* MIT Licensed
*/
@@ -10,13 +10,13 @@ var _ = require('underscore')
// end
/**
- * Help.
+ * Bike.
*
* @api private
*/
-var Help = exports = module.exports = function Help(){
- return Help.attach.apply(Help, arguments);
+var Bike = exports = module.exports = function Bike(){
+ return Bike.attach.apply(Bike, arguments);
};
/**
@@ -28,7 +28,7 @@ var Help = exports = module.exports = function Help(){
* @api public
*/
-Help.version = '0.5.0';
+Bike.version = '0.5.0';
/**
* Delimiter used among namespaces.
@@ -39,37 +39,37 @@ Help.version = '0.5.0';
* @api public
*/
-Help.delimiter = '.';
+Bike.delimiter = '.';
/**
* Namespace manager reference.
*
* @return {Object}
- * @see help/namespace.js
+ * @see bike/namespace.js
* @api public
*/
-Help.namespace = require('./help/namespace');
+Bike.namespace = require('./bike/namespace');
/**
* Cache manager reference.
*
* @return {Object}
- * @see help/cache.js
+ * @see bike/cache.js
* @api public
*/
-Help.cache = require('./help/cache');
+Bike.cache = require('./bike/cache');
/**
* Base object interpolation.
*
* @return {Object}
- * @see help/base.js
+ * @see bike/base.js
* @api private
*/
-Help.base = require('./help/base');;
+Bike.base = require('./bike/base');;
/**
* Attaches methods `define` and `create` on a given object.
@@ -81,18 +81,18 @@ Help.base = require('./help/base');;
* @api public
*/
-Help.attach = function(target){
+Bike.attach = function(target){
if(target){
- target.define = Help.define;
- target.create = Help.create;
- target.namespace = Help.namespace;
+ target.define = Bike.define;
+ target.create = Bike.create;
+ target.namespace = Bike.namespace;
}
- return Help;
+ return Bike;
};
/**
- * Defines in the `Help.cache` a new object.
+ * Defines in the `Bike.cache` a new object.
*
* Returns the cached object.
*
@@ -103,7 +103,7 @@ Help.attach = function(target){
* @api public
*/
-Help.define = function(name, plain, options, callback){
+Bike.define = function(name, plain, options, callback){
var obj = null
;
@@ -115,21 +115,21 @@ Help.define = function(name, plain, options, callback){
if(!plain){
if(options && options.extend){
- obj = Help.cache.get(options.extend);
+ obj = Bike.cache.get(options.extend);
delete options.extend;
}else{
- obj = Help.base;
+ obj = Bike.base;
}
if(options){
- obj = Help.base.extend(options, obj);
+ obj = Bike.base.extend(options, obj);
}
if(options && options.mixins){
options.mixins.forEach(function(mixin){
- mixin = Help.cache.get(mixin);
- obj = Help.base.mixin(mixin, obj);
+ mixin = Bike.cache.get(mixin);
+ obj = Bike.base.mixin(mixin, obj);
});
delete options.mixins;
@@ -140,7 +140,7 @@ Help.define = function(name, plain, options, callback){
obj = options;
}
- Help.cache.set(name, obj);
+ Bike.cache.set(name, obj);
if(callback){
callback.apply(obj, [name, options]);
@@ -161,8 +161,8 @@ Help.define = function(name, plain, options, callback){
* @api public
*/
-Help.create = function(name, plain, options, callback){
- var obj = Help.cache.get(name)
+Bike.create = function(name, plain, options, callback){
+ var obj = Bike.cache.get(name)
, isSingleton = false
;
@@ -178,23 +178,23 @@ Help.create = function(name, plain, options, callback){
}
if(options){
- obj = Help.base.extend(options, obj);
+ obj = Bike.base.extend(options, obj);
}
if(isSingleton){
- if(_.has(Help.cache.singletons, name)){
- obj = Help.cache.singletons[name];
+ if(_.has(Bike.cache.singletons, name)){
+ obj = Bike.cache.singletons[name];
}else{
- obj = Help.cache.singletons[name] = Help.base.create.call(obj, options || {});
+ obj = Bike.cache.singletons[name] = Bike.base.create.call(obj, options || {});
if(callback){
callback.apply(obj, [name, options]);
}
}
}else{
- obj = Help.base.create.call(obj, options || {});
+ obj = Bike.base.create.call(obj, options || {});
if(callback){
callback.apply(obj, [name, options]);
View
@@ -0,0 +1,19 @@
+/*!
+ * Bike
+ * Copyright(c) 2012 Gabriele Di Stefano <gabriele.ds@gmail.com>
+ * MIT Licensed
+ */
+
+var Proto = require('./proto')
+ ;
+
+/**
+ * Base.
+ */
+
+var Base = exports = module.exports = Proto.extend({
+
+ //__init : 'initialize'
+
+});
+
Oops, something went wrong.

0 comments on commit 772c5e2

Please sign in to comment.