Skip to content
Browse files

Fix the missing names.

  • Loading branch information...
1 parent 49b8524 commit 7c72c634af55e2ac238c3a6078259fbb10947a03 @creationix committed Feb 20, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 build.js
View
10 build.js
@@ -33,10 +33,6 @@ var Filters = {
return Haml.compile(haml);
},
- less: function (less) {
- return Less.compile(less);
- },
-
// Catchall
method_missing: function (format, text) {
// return text;
@@ -62,7 +58,11 @@ function process_folder(path) { return function (callback, errback) {
callback(pairs.reduce(function (obj, el) {
var ext = el[0].match(/[^.]*$/)[0];
var val = Filters[ext] ? Filters[ext](el[1]) : Filters.method_missing(ext, el[1]);
- obj[el[0].match(/([^/]*)\.[^\/]*$/)[1]] = val;
+ var name = el[0].match(/([^/]*)\.[^\/]*$/)[1];
+ if (typeof val === 'object') {
+ val.name = name;
+ }
+ obj[name] = val;
return obj;
}, {}));
}, errback);

0 comments on commit 7c72c63

Please sign in to comment.
Something went wrong with that request. Please try again.