bedrock icon indicating copy to clipboard operation
bedrock copied to clipboard

Create a discovery file for config

Open thomastuts opened this issue 5 years ago • 3 comments

This will let us provide default settings for the configuration to all discovery and task files - this is needed to make sure we don't break old projects since the Bedrock@next updates rely on an Express port being present in the configuration file.

We can assign a default value for this port to avoid issues where we update old projects but don't update the project's Bedrock config.

thomastuts avatar Jan 10 '20 09:01 thomastuts

Is this related to the "future" idea or a hanging todo in the current idea to release 1.20+next? (Which I would release as 1.20 together)

Wolfr avatar Jan 13 '20 16:01 Wolfr

This is already done, part of the Gulp upgrade involved having to specify a specific port for our Express server serving the compiled Pug templates.

The config returned by the config discovery file is a default config merged with the config that is specified in the project's bedrock.config.js file. This means that older projects that don't have this Express config section will use the default port (which is 8000).

thomastuts avatar Jan 16 '20 10:01 thomastuts

I checked out the code around having a default config 👍

Wolfr avatar Jan 21 '20 14:01 Wolfr