posthtml / posthtml-expressions

Use variables, JS-like expressions, and even markup-powered logic in your HTML.
Other
123 stars 20 forks source link

Changed package.json #152

Closed Ulyanov-programmer closed 1 year ago

Ulyanov-programmer commented 1 year ago

Proposed Changes

Moved a line indicating a dependency on posthtml from devDependencies to dependencies. This should allow you to run the plugin in plug'n'play mode in the yarn package manager. Done for this issue: #151

Types of Changes

Checklist

Scrum commented 1 year ago

The posthtml package is not included in the project as an explicit dependency, I don't understand why you moved it?

Ulyanov-programmer commented 1 year ago

When using Yarn with plug'n'play technology, it simply does not see the package's dependency on posthtml. In this case, if you try to use the package, yarn will simply give an error when starting.

https://github.com/thewebartisan7/posthtml-components/issues/33#issue-1709398129

Judging by the experience of another plugin, this can be avoided by specifying the plugins that are used during work in the usual dependencies.

Solving the problem: https://github.com/thewebartisan7/posthtml-components/issues/33#issuecomment-1551156969 https://github.com/thewebartisan7/posthtml-components/issues/33#issuecomment-1551257075

UPD: also see https://github.com/posthtml/posthtml-expressions/issues/151

Scrum commented 1 year ago

The plugin does not require the posthtml dependency, you are clearly doing something wrong. Give a link to the repository with the problem reproduced.

Ulyanov-programmer commented 1 year ago

The plugin has a direct dependency. https://github.com/posthtml/posthtml-expressions/blob/7a5317d61d38dd774b3978b343d60946da21b800/lib/locals.js#L6

You can reconstruct the error by copying the repository: https://github.com/Ulyanov-programmer/gulp_multitool/tree/develop After cloning, delete in the file .yarnrc.yml these code:

posthtml-expressions@*:
    dependencies:
      posthtml: "*"

And start the project by entering the yarn d command in the console.

Scrum commented 1 year ago

Uhh, really, I missed that while browsing. Thank you.