patternlab-node icon indicating copy to clipboard operation
patternlab-node copied to clipboard

PatternLab only loads the pattern engines from the config

Open ringods opened this issue 3 years ago • 4 comments

Closes #1251

Summary of changes:

  • Load the engines which are configured in the config first
  • Fallback to the old way of scanning node_modules if no engines are configured
  • Documentation added on the engines property in the PatternLab config file. URLs in the source code should point to this property once it is published during the release.
  • Proper deprecation messages should be in place.

ringods avatar Sep 01 '20 19:09 ringods

Coverage Status

Coverage decreased (-1.8%) to 75.0% when pulling 5d376a5cf2aaa903ea3c1be3aec901148ecbed8f on feature/resolver-pattern-engines into 1d28ab08e31fcb6bd09cddd2668d446bb3a6ed05 on dev.

coveralls avatar Sep 01 '20 20:09 coveralls

I can not approve that PR at the moment. The preview is not building.

Pattern Engine undefined: good to go Found plugin: @pattern-lab/plugin-tab Attempting to load and initialize plugin. where is the engine? Error rendering pattern lab header Omitting atoms-colors from styleguide patterns because it has an underscore prefix. where is the engine? error during header render() where is the engine? error during footer render() where is the engine? Error building buildFooterHTML

JosefBredereck avatar Sep 02 '20 17:09 JosefBredereck

When I add engine mustache, it is working. (We need to get rid of that engine to be required everywhere but it's part of the UI-kit) But it still messages: Pattern Engine undefined: good to go Pattern Engine undefined: good to go

[...]
    "mustache": {
      "package": "@pattern-lab/engine-mustache",
      "fileExtensions": [
        "mustache"
      ]
    }
[...]

JosefBredereck avatar Sep 02 '20 17:09 JosefBredereck

It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks!

stale[bot] avatar Dec 19 '20 08:12 stale[bot]

@ringods first of all thanks a lot for your work that you did so far regarding this topic. I tried to follow up on the feedback by @JosefBredereck and checked in some minor changes of how I would think about solving this topic. I hope that was in your interest.

I've integrated some workarounds, that we should be able to remove with https://github.com/pattern-lab/patternlab-node/pull/1455; as even also mentioned by @JosefBredereck we should get rid of mustache in favour of its successor handlebars anyhow.

mfranzke avatar Dec 26 '22 12:12 mfranzke