Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
The separated pattern folder name must be the pattern name
Like @engelfrost suggested it should be the same name, so that there is no error with the pattern group and subgroup names.
  • Loading branch information
Josef Bredereck committed Mar 11, 2019
commit 6a2a467b427cd08c3ce3851de206a2362fafdef9
7 changes: 4 additions & 3 deletions packages/core/src/lib/object_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ const Pattern = function(relPath, data, patternlab) {
*/
const pathObj = path.parse(path.normalize(relPath));
const info = {};
// colors(.mustache) is subbed in 00-atoms-/00-global/00-colors
// 00-colors(.mustache) is subbed in 00-atoms-/00-global/00-colors
info.hasDir =
pathObj.dir.indexOf(pathObj.name) !== -1 ||
pathObj.dir.indexOf(pathObj.name.split('~')[0]) !== -1;
path.basename(pathObj.dir) === pathObj.name ||
path.basename(pathObj.dir) === pathObj.name.split('~')[0];

info.dir = info.hasDir ? pathObj.dir.split(path.sep).pop() : '';
info.dirLevel = pathObj.dir.split(path.sep).length;

Expand Down