Permalink
Browse files

Ignore hidden files in precompile and build

closes #4
closes #6
  • Loading branch information...
1 parent 24ec94f commit 4a69c438635d05e9ffc218473f2a44a82da4ea36 @charlesdemers charlesdemers committed with ryanflorence Feb 17, 2013
Showing with 16 additions and 12 deletions.
  1. +8 −6 src/commands/build.js
  2. +8 −6 src/commands/precompile.js
View
@@ -23,12 +23,14 @@ function createIndex() {
var dirPath = rootify(dirName);
var walker = walk(dirPath);
walker.on('file', function(dir, stats, next) {
- var path = unroot(dir + '/' + stats.name).replace(/\.js$/, '');
- var name = inflector.objectify(path.replace(dirName, ''));
- modules.push({
- objectName: name,
- path: path
- });
+ if (stats.name.charAt(0) !== '.') {
+ var path = unroot(dir + '/' + stats.name).replace(/\.js$/, '');
+ var name = inflector.objectify(path.replace(dirName, ''));
+ modules.push({
+ objectName: name,
+ path: path
+ });
+ }
next();
});
});
View
@@ -41,12 +41,14 @@ function getTemplates(source, callback) {
var walker = walk(source);
walker.on('file', function(dir, stats, next) {
- var path = dir + '/' + stats.name;
- var name = path.replace(/\.handlebars$/, '').replace(source + '/', '');
- templates.push({
- name: name,
- content: fs.readFileSync(path).toString()
- });
+ if (stats.name.charAt(0) !== '.') {
+ var path = dir + '/' + stats.name;
+ var name = path.replace(/\.handlebars$/, '').replace(source + '/', '');
+ templates.push({
+ name: name,
+ content: fs.readFileSync(path).toString()
+ });
+ }
next();
});

0 comments on commit 4a69c43

Please sign in to comment.