Permalink
Browse files

Updated default extension list

  • Loading branch information...
1 parent e342723 commit 773c8ba470b1fe200682a59f2ae8cc81d5c859e9 @jarradseers committed Nov 9, 2012
Showing with 13 additions and 4 deletions.
  1. +12 −3 lib/express-load.js
  2. +1 −1 package.json
View
@@ -25,13 +25,22 @@ var title = 'express-load'
, reset = '\u001b[0m';
/**
+ * Defaults.
+ */
+
+var extlist = ['.js', '.node', '.json', '.coffee', '.sjs'];
+var checkext = true;
+
+/**
* ExpressLoad constructor.
*/
var ExpressLoad = function(entity, options) {
- this.options = options || {}
- if(this.options.checkext === undefined) { this.options.checkext=true;}
- if(this.options.extlist === undefined) { this.options.extlist=['.js','.node']; }
+ var options = options || {};
+ options.checkext = options.checkext || checkext;
+ options.extlist = options.extlist || extlist;
+
+ this.options = options;
this.scripts = [];
this.then(entity);
View
@@ -1,7 +1,7 @@
{
"name": "express-load",
"description": "Autoload modules into an Express application instance, config, models, routes, controllers etc...",
- "version": "1.1.3",
+ "version": "1.1.4",
"author": {
"name": "Jarrad Seers",
"email": "jarrad@jarradseers.com"

0 comments on commit 773c8ba

Please sign in to comment.