-
Notifications
You must be signed in to change notification settings - Fork 28
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
Hide core folder away from Bedrock users #320
Comments
I still like this idea. |
I don't know if I really like this idea anymore, it makes it harder to change something in core which can then be ported to Bedrock main. |
I really like this idea and I believe it can easily be made to work even if you plan to change things in core and contribute them. (In my opinion, this is more than just hiding Running a custom coreActually, in https://github.com/smartcoop/design I've only committed the I have actually installed a branch of mine, where a CLI tool is exposed, called What's interesting is this:
Yes, those are symlinks. This means that I can change Bedrock's source in its own directory, and call it from the Things to doTo make Bedrock a standalone tool that doesn't require to have a copy of its source in a given project, I see a few things to do:
The last point needs a bit more thinking. Pug only provides a single
To solve that problem, I have thought about defining some variable but Pug doesn't support variable interpolation with the Some people requested the ability to have multiple But it seems multiple I will give a shot in that direction. |
Wow, cool. It's been a while since we discussed this idea and we kind of left it open. FYI we have a global upgrade CLI that can be found at https://github.com/usebedrock/bedrock-cli . It also once contained some functionality to start a new Bedrock version based on a certain branch (we called that Bedrock bases. I just wrote a blog post about manual updates (slightly awkward but this is the way it is now) - https://bedrockapp.org/2021/07/14/bedrock-1-39-pre-release-warning/ . If we can prevent forcing people to update files manually by being smarter all-around it is worth discussing. |
Instead of loading the configuration using a relative path from core/, load it from the current working directory. This means that a Bedrock command should be called necessarily from a project root directory (where the config is supposed to live), but I guess this was already the case when using commands defined in the Gulpfile or in the package.json file. In other words, this change shouldn't have an impact on existing installs, but paves the road to allow calling Bedrock from projects that don't have the full source code of Bedrock within their own directory, and provide their own configuration files. See usebedrock#320 for details.
So I think I manage to solve this problem. Now I have to choose some naming scheme to properly separate user templates and Bedrock's. The idea is that we need an absolute path prefix to refer to Bedrock's files. I'm proposing, from a user perspective, that In practice, this means I'll have to move the Pug file under What do you think ? This means that user content such as this line in
will have to be changed to
This is not a very fun migration to ask to users, but the result is much clearer. |
To be honest, there are not that many Bedrock users out there except Mono. We've been maintaining this project as an open source project with care and attention to documentation & outside communication; but there is no big usage (yet!). I don't mind some manual migrations. The line mentioned is an exception that doesn't occur that often. I think people should ue the system mixins and not reference template from If that's still in Bedrock's source that's a bit of a leftover from how we used to do it. Most projects also stay with their Bedrock version that they start with because they are used for prototyping purposes (to be used only until the integration has been completed). So changing things to the core is definitely OK, as long as we are evolving and they have a good reason. |
I had to revert 385497f because it creates a problem with Bedrock's core JS that doesn't correctly import the config anymore after this change. |
Oh really sorry. Can you describe how I can reproduce the problem ? |
I looked into why |
I wanted to document the idea around hiding the core folder publicly. This was an idea from @thomastuts .
bedrock@next
as adevDependency
Why?
bedrock-cli
as a separate projectResult
We decided to not do anything in this vein right now, but to park the idea for later.
The text was updated successfully, but these errors were encountered: