Skip to content

Commit

Permalink
Merge pull request #257 from salsify/dont-assume-outputpath
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreeman authored Nov 22, 2021
2 parents e68f0ec + e61ab55 commit 404646f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ember-css-modules/lib/modules-preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ function formatJS(classMapping) {

class ModuleSourceFunnel extends Funnel {
constructor(input, stylesTree, options) {
super(input, options);
this.stylesTree = stylesTree;
super([input, stylesTree], options);
this.parentName = options.parentName;
this.destDir = options.outputRoot;
this.inputHasParentName = null;
Expand All @@ -248,8 +247,9 @@ class ModuleSourceFunnel extends Funnel {
`${this.inputPaths[0]}/${this.parentName}`
);

let stylesTreePath = this.inputPaths[1];
let stylesTreeHasParentName = fs.existsSync(
`${this.stylesTree.outputPath}/${this.parentName}`
`${stylesTreePath}/${this.parentName}`
);
if (stylesTreeHasParentName && !this.inputHasParentName) {
this.destDir += `/${this.parentName}`;
Expand Down

0 comments on commit 404646f

Please sign in to comment.