Skip to content

Commit 0b33632

Browse files
chore: make LMP bundle setup easier
- Add init-submodules target to pull git submodules - Create .env with required Blockfrost variables - Combine all steps into single `make setup` command
1 parent b0250d7 commit 0b33632

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build-dev-v1-app build-dev-lmp-app build-prod-v1-app build-prod-lmp-app
1+
.PHONY: build-dev-v1-app build-dev-lmp-app build-prod-v1-app build-prod-lmp-app init-submodules install-dependencies create-dot-env setup
22

33
# Reusable functions
44
define get-extension-id
@@ -25,6 +25,25 @@ define build-lmp-app
2525
@echo "✅ Built to ./v2/apps/midnight-extension/dist"
2626
endef
2727

28+
# Prerequisites
29+
init-submodules:
30+
git submodule update --init --recursive
31+
@echo "✅ Submodules initialized"
32+
33+
install-dependencies:
34+
bash -c 'source $$NVM_DIR/nvm.sh && cd v1 && nvm use && yarn'
35+
@echo "✅ v1 dependencies installed"
36+
bash -c 'source $$NVM_DIR/nvm.sh && cd v2 && nvm use && npm i'
37+
@echo "✅ v2 dependencies installed"
38+
39+
create-dot-env:
40+
@echo "BLOCKFROST_PROJECT_ID_MAINNET=notused" > v2/apps/midnight-extension/webpack/.env
41+
@echo "BLOCKFROST_PROJECT_ID_PREPROD=notused" >> v2/apps/midnight-extension/webpack/.env
42+
@echo "BLOCKFROST_PROJECT_ID_PREVIEW=notused" >> v2/apps/midnight-extension/webpack/.env
43+
44+
setup: init-submodules install-dependencies create-dot-env
45+
@echo "✅ Setup complete"
46+
2847
# Development builds
2948
build-dev-v1-app:
3049
$(call build-v1-app,development,WEBPACK_ENV=dev )

0 commit comments

Comments
 (0)