Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple basedirs #404

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

thusc
Copy link
Contributor

@thusc thusc commented Jul 18, 2021

This branch allows the Pug templating system to find templates in multiple basedirs. This is part of the required changes to let Bedrock be installed outside a project using it. See #320.

I have rebased my cli branch on top of this one, and with some additional changes, was able to npm install 'git+https://github.com/thusc/bedrock.git#cli'. You can have a look at this Dockerfile to see an example usage.

I will turn the cli branch into smaller PRs in the next days.

I don't think users that have Bedrock core within their project have to do anything following this change. But if they want to remove it in the future (once a package is available), the required changes can be see in the Make content use proper Pug prefixes. commit of this PR.

@vercel
Copy link

vercel bot commented Jul 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/monocompany/bedrock/H7yT8SPT3HydHa8NCJnyEvhLBJeZ
✅ Preview: https://bedrock-git-fork-thusc-multiple-basedirs-monocompany.vercel.app

@Wolfr
Copy link
Contributor

Wolfr commented Jul 19, 2021

So users have to remove relative paths to core, and other than that, things keep working as-is? I am fine with that.

I am not that familiar with Docker and don't completely understand the use case you are going for yet.

My current understand is that it's something with building out the HTML for different components to explicit folders (while still being able to use Bedrock to develop that HTML and corresponding CSS), to then use that HTML as a base for usage in other contexts.

In general, the process you are solving #320, which will help with future upgradeability of Bedrock, but also is needed for your use case, and to have clean code in general - is that right?

@thusc
Copy link
Contributor Author

thusc commented Jul 19, 2021

So users have to remove relative paths to core, and other than that, things keep working as-is? I am fine with that.

Yes, and that's necessary only if you want to benefit from a Bedrock core that is not in the current directory. Otherwise, it should still work fine.

This is only about #320, proper separation of concern, and to turn Bedrock in a really nice standalone tool. Installing it will be just a npm install away, it will be easier to get updates (or rollback to a previous version) or try a branch on different projects.

noteed added a commit to hypered/smart-design that referenced this pull request Apr 25, 2023
This will make it possible to cleanly separate Bedrock's templates from
the user project templates.

This is cherry-picked from
usebedrock/bedrock#404.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants