Code Monkey home page Code Monkey logo

Comments (6)

JosefBredereck avatar JosefBredereck commented on May 25, 2024 1

If you do not need the files located in https://github.com/n8design/htwoo/tree/main/htwoo-core/helpers loaded by handlebars, this is also not required and you can just use

  "engines": {
    "handlebars": {
      "package": "@pattern-lab/engine-handlebars",
    }
  }

from patternlab-node.

JosefBredereck avatar JosefBredereck commented on May 25, 2024

I'm afraid none of the above is correct.
I wonder that there is an error message popping up because we do absolutely nothing with the given settings at the moment.
For most engines we, we only use extent, noting more.

I think the initial intention of the creator of that code was to allow the user to override the default fileExtensions.
I will prepare a fix for the engines and also for the documentation.

Thank you very much for highlighting this discrepancy.

from patternlab-node.

JosefBredereck avatar JosefBredereck commented on May 25, 2024

Have you updated the package @pattern-lab/engine-handlebars in the first project where you tried?
Would you mind reproducing it and hand me the error message you receive?

I tried it for myself with different options and none were giving me an error.

from patternlab-node.

StfBauer avatar StfBauer commented on May 25, 2024

Where I started:

Screenshot 2023-02-07 at 09 51 17

I also had only extend in configuration:

  "engines": {
    "handlebars": {
      "extend": "helpers/*.js"
    }
  }

Which I then update to:

  "dependencies": {
    "@pattern-lab/cli": "^6.0.1",
    "@pattern-lab/core": "^6.0.1",
    "@pattern-lab/engine-handlebars": "^6.0.0",
    "@pattern-lab/uikit-bare": "^0.0.1",
    "@pattern-lab/uikit-workshop": "^6.0.1"
  }

After npm install and run pattern labs got the following message still with the extend in there:

image

I headed over to the documentation, pasted the prescribed change, and got the same message. That's how I provisioned a new project and figured out the misleading configuration there.

If you like reproducing it, you can use hTWOo.

  • Clone the repo
  • navigate to htwoo-core folder in there and try it for yourself

Thanks in advance.

from patternlab-node.

JosefBredereck avatar JosefBredereck commented on May 25, 2024

The only required parameter is the following and it is the source of the issue.
"package": "@pattern-lab/engine-handlebars",

The extend property will be used by the handlebars engine if you have extensions installed.

from patternlab-node.

StfBauer avatar StfBauer commented on May 25, 2024

Am I correct? The only thing needed is:

  "engines": {
    "handlebars": {
      "package": "@pattern-lab/engine-handlebars",
      "extend": "helpers/hbs/*.js"
    }
  }

or could I remove even the "extend" and all the helpers will get recognised too?

from patternlab-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.