Permalink
Browse files

Closed #25

  • Loading branch information...
filipediasf committed Dec 19, 2012
1 parent 6d216b0 commit 95ba8baec10dec45e0d46be8c552bfaa8001d48a
Showing with 17 additions and 609 deletions.
  1. +9 −1 index.js
  2. +0 −5 test/assets/file1.json
  3. +0 −1 test/assets/file2
  4. +0 −26 test/tasks/callback.js
  5. +8 −550 test/test.js
  6. +0 −13 test/util/is-dir.js
  7. +0 −13 test/util/is-file.js
View
@@ -125,11 +125,19 @@
folder = fs.realpathSync(folder) + '/';
var filenames = fs.readdirSync(folder),
+ file,
i
;
for (i = filenames.length - 1; i >= 0; --i) {
- this.addTask(require(folder + path.basename(filenames[i], '.js')));
+ file = filenames[i];
+
+ // Skip files that do not have a .js extension
+ if (path.extname(file) !== '.js') {
+ continue;
+ }
+
+ this.addTask(require(folder + file));
}
return this;
View
@@ -1,5 +0,0 @@
-{
- "name": "Marco Oliveira",
- "email": "marco@indigounited.com",
- "some_field": "This has a {{placeholder}}, you see?"
-}
View
@@ -1 +0,0 @@
-name and an email field
View
@@ -1,26 +0,0 @@
-module.exports = {
- id: 'callback',
- options: {
- filterCallback: {
- 'default': function () {}
- },
- callback: {
- 'default': function () {}
- },
- someOption: {
- 'default': 'default'
- }
- },
- filter: function (opt, next) {
- opt.filterCallback(opt);
- next();
- },
- tasks: [
- {
- task: function (opt, next) {
- opt.callback(opt);
- next();
- }
- }
- ]
-};
Oops, something went wrong.

0 comments on commit 95ba8ba

Please sign in to comment.