Add a cwd or root option to Eleventy core
#4101
Replies: 8 comments
-
|
Impact:
One of the big questions for me is whether or not this should run |
Beta Was this translation helpful? Give feedback.
-
|
why don't we just fully respect --input path for all of those? |
Beta Was this translation helpful? Give feedback.
-
|
@terpimost well, that would be a very big breaking change and would break a bunch of existing projects, so I don’t think we want to do that. We’ve always differentiated project root from input directory (even though the default is |
Beta Was this translation helpful? Give feedback.
-
|
Could you clarify if ELEVENTY_ROOT value would always reflect what eleventy things the root is? And it would be nice to control that via some --eleventy-root parameter |
Beta Was this translation helpful? Give feedback.
-
|
Would this cause a breaking change, from your impact post, seems to affect quit a few things. I'm no expert! But the way things work today seem fine to me. what advantages would be gained ? |
Beta Was this translation helpful? Give feedback.
-
|
@djwebdroid for cases when eleventy is executed from one place, input is in another and output is in another. In some organizations with mono repos and not popular build systems (nix) ability to pint eleventy to every location involved in the build is very helpful. |
Beta Was this translation helpful? Give feedback.
-
|
@djwebdroid no I wouldn’t expect these to be breaking changes for anyone. This is an opt-in feature for folks that want to run their Eleventy command from a different directory than where their project resides. |
Beta Was this translation helpful? Give feedback.
-
|
@terpimost for sure! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We have
input(directory, file, glob) but no mechanism to change the root directory from which Eleventy runs. We always assume this matchesprocess.cwd()which may or may not be true.Related #1155 #3854 #937
Marginally related #2793
Beta Was this translation helpful? Give feedback.
All reactions