From fad64347304f07b2ce6a0b3eb49591b27537fe8b Mon Sep 17 00:00:00 2001 From: Ross Phillips <12723297+rphillips-cc@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:17:17 +1200 Subject: [PATCH] Fix for nested config files on 11ty --- package.json | 2 +- src/lib/eleventy.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 31efe79..1c6c3ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cloudcannon/command-builder", - "version": "1.1.4", + "version": "1.1.5", "description": "A script that builds the script that builds your site", "main": "src/index.js", "scripts": { diff --git a/src/lib/eleventy.js b/src/lib/eleventy.js index 4cd9f69..5191ce6 100644 --- a/src/lib/eleventy.js +++ b/src/lib/eleventy.js @@ -65,13 +65,16 @@ function getInstallCommands(buildConfig) { 'CONFIG_DIR=`dirname $CONFIG`', 'echo $CONFIG_DIR', + 'PWD=`pwd`', + 'echo $PWD', + 'CONFIG_BASE=`basename $CONFIG`', 'echo $CONFIG_BASE', - 'CONFIG_INJECTED="$CONFIG_DIR/inject-cloudcannon.config.cjs"', + 'CONFIG_INJECTED="$PWD/$CONFIG_DIR/inject-cloudcannon.config.cjs"', 'echo $CONFIG_INJECTED', - 'export CC_ELEVENTY_CONFIG="$CONFIG_DIR/default-$CONFIG_BASE"', + 'export CC_ELEVENTY_CONFIG="$PWD/$CONFIG_DIR/default-$CONFIG_BASE"', 'echo $CC_ELEVENTY_CONFIG', // Move the site config file to injected config require location