From 5893105d940471d4038ac55d902fd4e2242865ec Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:42:03 -0800 Subject: [PATCH] Added init defaults. --- CHANGELOG.md | 2 ++ examples/lamp-init/README.md | 8 ++++++++ inits/lamp.js | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6db5b..7e788b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Added `defaults` to the `init` function. + ## v1.8.1 - [December 9, 2024](https://github.com/lando/lamp/releases/tag/v1.8.1) * Removed unneeded `@lando/nginx` dependency diff --git a/examples/lamp-init/README.md b/examples/lamp-init/README.md index e51523b..010fa12 100644 --- a/examples/lamp-init/README.md +++ b/examples/lamp-init/README.md @@ -75,6 +75,14 @@ lando php -v |grep "5.6" lando exec database -- mysql --version | grep "10.3" lando poweroff mv orig.lando.yml .lando.yml + +# Should have defaults in .lando.yml +cd lamp +cat .lando.yml | grep 'php: "7.4"' +cat .lando.yml | grep "via: apache" +cat .lando.yml | grep "xdebug: false" +cat .lando.yml | grep "webroot: ." +cat .lando.yml | grep "database: mysql" ``` ## Destroy tests diff --git a/inits/lamp.js b/inits/lamp.js index 8f80258..efff55b 100644 --- a/inits/lamp.js +++ b/inits/lamp.js @@ -5,4 +5,11 @@ */ module.exports = { name: 'lamp', + defaults: { + via: 'apache', + php: '7.4', + database: 'mysql', + webroot: '.', + xdebug: false, + }, };