Roots Discourse

Using bedrock and sage without trellis

I’ve been looking into using bedrock to manage our site plugins better and make local development a bit easier than having to manually copy a new instance of wp then cloning the theme etc…
However i can’t seem to find any information as to go about setting up a new site repository.
In my head what i feel should be possible is to :

  • Clone bedrock
  • Clone sage into the theme folder
  • Composer install from the repository root
  • Make changes to the theme and store both bedrock and sage to one repository for each site built

However following this you have to composer install both in the site bedrock root and inside the site theme root causing you to have 2 vendor directories which feels wrong.
Can anyone shed some light on this ? I tried reading through the example however this is using trellis aswell and i have not got any experience with ansible.
This does state
Here’s how this example project was created:

Create a new project directory: $ mkdir && cd
Clone Trellis: $ git clone --depth=1 && rm -rf trellis/.git
Clone Bedrock: $ git clone --depth=1 site && rm -rf site/.git
Clone Sage: $ git clone --depth=1 --branch sage-8 site/web/app/themes/sage && rm -rf site/web/app/themes/sage/.git

So it seems that this workflow is possible, is it a case of having to have ansible to manage the dependencies of the theme aswell as the plugin dependencies of bedrock ?
Any help would be greatly appreciated.

1 Like

Hey, you might check this post out -

I set Bedrock up on Scotch Box a while back to simulate installing on shared hosting. YMMV as that’s a pretty old post, but it may point you in the right direction.

Hi smutek, i couldn’t see anything in that post about using the sage theme ?

Hi, sorry if I misunderstood, but once Bedrock is installed I would just follow the regular instructions for installing Sage.

Even when using Trellis, plugins are still managed via the Bedrock directory, and its composer.json - you’re not seeing the Sage vendor directory on the example project because it’s git ignored. I think the composer.json in Sage is primarily for theme setup, rather than ongoing management. It’s fine to ignore it.

Hope that was helpful.