From 62791d13474544a0175657ffb45360fdcc779b2f Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 21 Nov 2013 15:17:19 +0200 Subject: [PATCH] check file extension before adding it to the index --- src/commands/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/build.js b/src/commands/build.js index ae082b5..fb5e609 100644 --- a/src/commands/build.js +++ b/src/commands/build.js @@ -58,7 +58,7 @@ function createIndex(cb) { var dirPath = getAssetPath(dirName); var walker = walk(dirPath); walker.on('file', function(dir, stats, next) { - if (stats.name.charAt(0) !== '.') { + if (stats.name.charAt(0) !== '.' && stats.name.match(/\.js$/)) { var path = unroot(dir+'/'+stats.name).replace(/\.js$/, ''); if (dirName == 'helpers') { helpers.push({path: path});