Skip to content

[uikits] duplicated pattern menu and broken build with second uikit #901

@ronalson

Description

@ronalson

I am using Pattern Lab Node v3.0.0-alpha.16 on Mac, with Node v8.11.1, using a Vanilla Edition with starterkit-mustache-demo.

CASE 1: Single Uikit

Expected Behavior

Using the config bellow and running npm run pl:build expected that patterns were built inside /workshop directory.

"uikits": [
        {
            "name": "uikit-workshop",
            "outputDir": "workshop",
            "enabled": true,
            "excludedPatternStates": [],
            "excludedTags": []
        }
    ]
Actual Behavior

Output of npm run pl:build appears inside /workshop that's right. However, I can also see some files inside /public; Question: is this expected?

I tested this with gulp edition and the /public folder was not filled with any file.

Screen Shot VSCode

CASE 2: Two Uikits

Add uikit-bare following these instructions: https://github.com/pattern-lab/uikit-bare/blob/master/.github/CONTRIBUTING.md

"uikits": [
        {
            "name": "uikit-workshop",
            "outputDir": "workshop",
            "enabled": true,
            "excludedPatternStates": [],
            "excludedTags": []
        },
        {
            "name": "uikit-bare",
            "outputDir": "storefront",
            "enabled": true,
            "excludedPatternStates": [],
            "excludedTags": []
        }
    ]

running npm run pl:build I have a fill issues:

  1. terminal with a bunch of duplicated outputs:
...
Found a lower common denominator pattern state: inreview on templates-detail. Setting reverse lineage pattern pages-contact from <<blank>>
Found a lower common denominator pattern state: inreview on templates-detail. Setting reverse lineage pattern pages-contact from <<blank>>
...
Built Pattern Lab front end
Built Pattern Lab front end
Built Pattern Lab front end
Built Pattern Lab front end
Pattern Lab is watching for changes to files under source/
Pattern Lab is watching for changes to files under source/
Pattern Lab is being served from http://127.0.0.1:3000
Pattern Lab is being served from http://127.0.0.1:3000
Pattern Lab is being served from http://127.0.0.1:3000
Pattern Lab is being served from http://127.0.0.1:3000
  1. this error (duplicated on terminal)
{ Error: ENOENT: no such file or directory, open '/xxx/storefront/public/patterns/00-atoms-00-global-00-brand-colors/00-atoms-00-global-00-brand-colors.markup-only.html'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at _.each.uikit (xxx/node_modules/@pattern-lab/core/src/lib/markModifiedPatterns.js:48:44)
    at /xxx/node_modules/@pattern-lab/core/node_modules/lodash/lodash.js:4917:15
    at baseForOwn (xxx/node_modules/@pattern-lab/core/node_modules/lodash/lodash.js:3002:24)
    at /xxx/node_modules/@pattern-lab/core/node_modules/lodash/lodash.js:4886:18
    at Function.forEach (xxx/node_modules/@pattern-lab/core/node_modules/lodash/lodash.js:9334:14)
    at cleanPattern (xxx/node_modules/@pattern-lab/core/src/lib/markModifiedPatterns.js:39:7)
    at Array.forEach (<anonymous>)
    at forEachExisting (xxx/node_modules/@pattern-lab/core/src/lib/markModifiedPatterns.js:28:13)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/xxx/storefront/public/patterns/00-atoms-00-global-00-brand-colors/00-atoms-00-global-00-brand-colors.markup-only.html' }
Error rendering pattern lab header
Error rendering pattern lab header
  1. the output in the browser has no pattern and duplicated menu items (for both workshop and storefront instances).

screen shot 2018-07-20 at 16 14 09

Steps to Reproduce
  1. Install Pattern-Lab with edition-node and starterkit-mustache-demo as stated here
  2. Build and Serve with "name": "uikit-workshop", "outputDir": "workshop", (CASE 1)
  3. Add uikit-base as stated here
  4. Build and Serve with uikit config from case 2 (CASE 2)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions