Skip to content

Commit

Permalink
Add support for ignoring files
Browse files Browse the repository at this point in the history
  • Loading branch information
pvorb committed Feb 17, 2012
1 parent dc117b2 commit ad9d583
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bake.js
Expand Up @@ -31,6 +31,8 @@ var bake = function(conf, hooks, cb) {
var fileExtPattern
= new RegExp('\\.(' + Object.keys(fileExt).join('|') + ')$', 'i');

var ignore = conf.ignore || [];

// Status log
console.log('Beginning to bake ' + inputDir + '.');

Expand All @@ -44,7 +46,8 @@ var bake = function(conf, hooks, cb) {
var match;

// Match the master-file's name against enabled file extensions
if (match = master.match(fileExtPattern)) {
if (ignore.indexOf(master) == -1
&& (match = master.match(fileExtPattern))) {

// Get the file extension of the master file
var masterExt = match[1];
Expand Down

0 comments on commit ad9d583

Please sign in to comment.