Replies: 2 comments 6 replies
-
peerDependencies so that it's consistent with how npm work. The reason why it's not in
Yes. It's only for
Yes, you can. The only exceptions are
Only for documentation purposes to indicate which fields will be considered by the preset.
Check out |
Beta Was this translation helpful? Give feedback.
-
Thanks again for your answers!
Ah, to avoid it being completely inaccessible as an implementation detail of the package, while it really needs to be in the I realize I got confused by looking at Concerning why But what if I want to use this preset in itself? A preset that contains a typescript configuration and uses typescript, for example. How would I do this without this I am wondering whether templates for use cases of this couldn't actually be taken from the files they install. That is, instead of having the templates be stored in a separate templates subdirectory, let the files themselves be the templates. That way there's no need to install them. The one thing where this would break is for variable interpolation, but we could forbid that (by erroring out, perhaps) if you do that. If you want to actually document |
Beta Was this translation helpful? Give feedback.
-
A few more questions concerning v3 of presetter. My goal is to be able to write a preset that's as straightforward as possible.
I am trying to figure out how
peerDependencies
anddevDependencies
work in a preset. Which become dependencies of the project that uses the preset? Why don't presets have simpledependencies
?the setup logic in some of the presets is quite complex and seems to be doing functionality that could be done by the presetter system itself. There are a lot of lines like this
js-yaml templates/eslintrc.yaml | pupa --test=spec --output=lib > .eslintrc.json
which duplicate behavior of presetter itself to a certain extent.I still see types defined like
Variable
andPresetAsset
defined in the presets. These could be imported from presetter itself to make the preset a lot more readable, and I don't understand why that isn't happening.You define a
PresetConfig
type and export it, but I'm struggling to find what this type is being used for. If I look through the source code I can't see it being referred to anywhere, so what purpose does it serve?You showed me an example of a nested config file like
.github/workflows
or husky files, but I can't find it anymore. :)Beta Was this translation helpful? Give feedback.
All reactions