Permalink
Browse files

Update odotjs, clean up package.json

  • Loading branch information...
Eric Hamilton
Eric Hamilton committed Oct 13, 2012
1 parent 3b0d065 commit b5de4cee8b37132be9d43381eb14d2e115020967
Showing with 16 additions and 15 deletions.
  1. +12 −12 dist/applitude.bundle.js
  2. +2 −1 grunt.js
  3. +2 −2 package.json
View
@@ -708,22 +708,23 @@
/**
* Returns an object factory that stamps out objects
* using a specified shared prototype and init.
- *
- * @param {object} sharedProperties Prototype
- * @param {object} defaultProperties Instance safe
- * @param {function} initFunction Init and privacy
- *
- * @return {function} A new object factory.
+ *
+ * @param {Object} sharedProperties prototype
+ * @param {Object} defaultProperties instance properties
+ * @param {Function} instanceInit instance level init
+ * @param {Function} factoryInit factory level init
+ * @param {Boolean} ignoreOptions ignore instance options?
+ * @return {Function} factory function
*/
factory: function factory(sharedProperties, defaultProperties,
- instanceInit, factoryInit, target) {
+ instanceInit, factoryInit, ignoreOptions) {
var optionNames = 'sharedProperties, defaultProperties,' +
- ' instanceInit, factoryInit, target',
+ ' instanceInit, factoryInit, ignoreOptions',
config,
initObj = o();
config = mapOptions(optionNames, sharedProperties,
- defaultProperties, instanceInit, factoryInit, target);
+ defaultProperties, instanceInit, factoryInit, ignoreOptions);
config.instanceInit = config.instanceInit || defaultInit;
// factoryInit can be used to initialize shared private state.
@@ -735,12 +736,11 @@
var defaultProperties = config.defaultProperties || {},
sharedProperties = extend(config.sharedProperties ||
{}, initObj),
- instance = defaultProperties,
- target = (config.target) ? config.target : instance,
+ instance = (config.ignoreOptions) ? defaultProperties :
+ extend({}, defaultProperties, options),
obj,
init;
- extend(target, options);
obj = extend(o(sharedProperties, instance));
init = config.instanceInit;
View
@@ -50,5 +50,6 @@ module.exports = function(grunt) {
tasks: ['lint', 'concat,', 'qunit']
}
});
- grunt.registerTask('default', 'lint concat qunit');
+ grunt.registerTask('default', 'lint concat');
+ grunt.registerTask('test', 'qunit');
};
View
@@ -1,6 +1,6 @@
{
"name": "applitude",
- "version": "0.6.6",
+ "version": "0.6.7",
"description": "Simple Module Management",
"author": {
"name": "Eric Elliott",
@@ -32,7 +32,7 @@
},
"scripts": {
"postinstall": "grunt",
- "test": "grunt"
+ "test": "grunt test"
},
"engines": {
"node": "*",

0 comments on commit b5de4ce

Please sign in to comment.