From 96826d5ea928873d4a6cbd21d1811aba434838d0 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 16 Feb 2022 21:55:41 +0000 Subject: [PATCH] build: add script to view starters --- package.json | 2 ++ scripts/view-starter-dev.sh | 6 ++++++ scripts/view-starter.sh | 5 +++++ 3 files changed, 13 insertions(+) create mode 100755 scripts/view-starter-dev.sh create mode 100755 scripts/view-starter.sh diff --git a/package.json b/package.json index 60ddf8d2..b9278f08 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,8 @@ "stylelint-scss": "3.19.0" }, "scripts": { + "view": "scripts/view-starter.sh", + "view:local": "scripts/view-starter-dev.sh", "test": "echo \"Error: no test specified\" && exit 1", "lint": "yarn run lint:js && yarn run lint:style", "lint:js": "eslint '*/**/*.{js,ts,tsx}'", diff --git a/scripts/view-starter-dev.sh b/scripts/view-starter-dev.sh new file mode 100755 index 00000000..9e67367c --- /dev/null +++ b/scripts/view-starter-dev.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env zsh + +HUGOxPARAMSxCMSxLOCAL_BACKEND=true \ +HUGO_MODULE_REPLACEMENTS="github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 -> ../../../wowchemy,github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 -> ../../../wowchemy-cms" \ +hugo server -F --port 80 --bind 0.0.0.0 \ +--source "starters/$1" diff --git a/scripts/view-starter.sh b/scripts/view-starter.sh new file mode 100755 index 00000000..5e14a286 --- /dev/null +++ b/scripts/view-starter.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh + +HUGOxPARAMSxCMSxLOCAL_BACKEND=true \ +hugo server -F --port 80 --bind 0.0.0.0 \ +--source "starters/$1"