munshkr / ejs-brunch

Adds EJS template compilation support to Brunch
4 stars 4 forks source link

Fix for nested templates folders e.g. www/templates #2

Closed radzserg closed 7 years ago

radzserg commented 7 years ago

Currently if templates folder is not located in the root of the project an error happens.

var baseDir = this.config.watched.find(d => parts.indexOf(d) > -1);

// this.config.watched = ['www/templates', ...] // parts = ['www', 'templates', 'path', 'to', 'template']

I did a fix that compares whole string filePath with this.config.watched. Works fine for me. Unfortunately don't have too much tests for that.