Skip to content

Make bedrock a meta-package by extracting files into separate package #533

Open
@heiglandreas

Description

Summary

By extracting the content of the config as well as the web folder into a separate package (i.e. bedrockfiles) that this package then requires, this package could be used to create a project but the files that currently then need to be added to version control of the newly created project could still then be handled as dependencies.

Motivation

Curently after calling composer create-project roots/bedrock I will have to add the files within the config-folder as well as the files within the web-folder to my version control. But those actually aren't files I need to or should edit. Usually those files are dependencies of my project that I don't want to (and probably shouldn't) edit. Why should I add them to my version-control then? Especially when one of the great advantages of bedrock is, that I don't need to add files to my version control that do not belong there.

But when I currently do exactly that (not adding them to VersionControl) I will not be able to retrieve a working installation using composer install as those few files are missing.

By extracting them to a separate package I would still have them installed on composer create-project but I would also get them installed on calling composer install. And a omposer update` would even update the files to the latest version.

Additional context

My main idea is to have a fully working WordPress with the least possible number of files. So for me the unique part of any WordPress installation usually is composer.json and composer.lock which contains all the plugins and WordPress as dependencies and then there is the theme folder. If the theme is a child theme, the parent theme is also a dependency within composer.json. Additionally there are some files for a docker-setup that usually are project specific (like the database-dump for dev and stage and such things). I'm currently thinking about moving them to a package as well.

This allows me to do the following to have a new (development) system up and running within seconds:

composer install
docker-compose up -d

OK: Perhaps in between one should copy the .env.dist to .env...

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions