Skip to content

Commit

Permalink
fix addon MU detection
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Feb 14, 2019
1 parent 07a729a commit 4571b1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion lib/models/addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ let addonProto = {
@return {Boolean} Whether this is using a module unification format.
*/
isModuleUnification() {
return false;
return this.has('src');
},

/**
Expand Down Expand Up @@ -1424,6 +1424,18 @@ let addonProto = {
}
},

/**
Returns whether or not the given file name is present in this project.
@private
@method has
@param {String} file File name
@return {Boolean} Whether or not the file is present
*/
has(file) {
return fs.existsSync(path.join(this.root, file)) || fs.existsSync(path.join(this.root, `${file}.js`));
},

/**
Augments the applications configuration settings.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{{#basic-thing}}WOOT!!{{/basic-thing}}
<SomeCoolAddon::BasicThing>WOOT!!</SomeCoolAddon::BasicThing>
{{#second-thing}}SECOND!!{{/second-thing}}

0 comments on commit 4571b1d

Please sign in to comment.