Skip to content

Commit

Permalink
Support Many Kinds of Projects
Browse files Browse the repository at this point in the history
  • Loading branch information
jherdman committed Sep 13, 2018
1 parent 3afce2f commit 91adb6a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/commands/print-failing.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@ module.exports = {
let linter = new Linter();
let templatesWithErrors = [];

let templateFiles = walkSync('app').filter(file => {
let appRoot;

if (project.isEmberCLIAddon()) {
appRoot = 'addon';
} else if (project.isModuleUnification()) {
appRoot = 'src';
} else {
appRoot = 'app';
}

let templateFiles = walkSync(appRoot).filter(file => {
// remove any non-hbs files
return path.extname(file) === '.hbs';
});

templateFiles.forEach(file => {
let filePath = path.join('app', file);
let filePath = path.join(appRoot, file);
let contents = fs.readFileSync(filePath, { encoding: 'utf8' });
let moduleId = path.join(modulePrefix, file).slice(0, -4);

Expand Down

0 comments on commit 91adb6a

Please sign in to comment.