Skip to content

Commit

Permalink
fix: local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
hazcod committed Mar 3, 2023
1 parent eae2e05 commit 847074a
Show file tree
Hide file tree
Showing 4 changed files with 7,118 additions and 18 deletions.
29 changes: 14 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
all: clean dev-hugo
PORT=8788

dev: dev-wrangler-build dev-miniflare
all: clean dev

dev: dev-wrangler

install:
brew install hugo npm
npm install -g wrangler@beta

dev-miniflare:
miniflare dist/worker.js --watch --debug --host=localhost --https --wrangler-config=wrangler.toml \
--env dev.env
npm install
npm install -g wrangler

dev-hugo:
hugo serve --gc --config=config.yml
npm run server

dev-wrangler-build:
wrangler build --env dev
npx rangler build --env dev --log-level=debug --local

dev-wrangler:
wrangler dev --env dev --local --local-protocol=http --host localhost
npx wrangler dev --env dev --log-level=debug --local --ip 127.0.0.1 --port $(PORT)

build-hugo:
hugo --gc --config=config.yml
npm run build

publish:
hugo --minify --gc --config=config.yml
wrangler publish --env prd
npm run build
npx wrangler publish --env prd

clean:
rm -r dist/ generated/ resources/ workers/worker/ || true

logs:
wrangler tail --env prd
npx wrangler tail --env prd

open:
open https://localhost:8787
open https://localhost:$(PORT)
Loading

0 comments on commit 847074a

Please sign in to comment.