Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
makefile: install yarn (#526)
Browse files Browse the repository at this point in the history
* makefile: install yarn

* gitignore
  • Loading branch information
fedekunze authored Sep 23, 2020
1 parent e3f3619 commit 291dfca
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ docs/node_modules
docs/modules
dist
tools-stamp
docs-tools-stamp
proto-tools-stamp
golangci-lint
keyring_test_cosmos
Expand Down
21 changes: 18 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,16 @@ else
@echo "solcjs already installed; skipping..."
endif

docs-tools:
ifeq (, $(shell which yarn))
@echo "Installing yarn..."
@npm install -g yarn
else
@echo "yarn already installed; skipping..."
endif

tools: tools-stamp
tools-stamp: contract-tools runsim
tools-stamp: contract-tools docs-tools runsim
# Create dummy file to satisfy dependency and avoid
# rebuilding when this Makefile target is hit twice
# in a row.
Expand All @@ -232,7 +240,13 @@ tools-clean:
rm -f $(RUNSIM)
rm -f tools-stamp

.PHONY: runsim tools tools-stamp tools-clean
docs-tools-stamp: docs-tools
# Create dummy file to satisfy dependency and avoid
# rebuilding when this Makefile target is hit twice
# in a row.
touch $@

.PHONY: runsim tools tools-stamp tools-clean docs-tools-stamp

###############################################################################
### Tests & Simulation ###
Expand Down Expand Up @@ -402,7 +416,8 @@ docs-serve:

# Build the site into docs/.vuepress/dist
docs-build:
@cd docs && \
@$(MAKE) docs-tools-stamp && \
cd docs && \
yarn install && \
yarn run build

Expand Down

0 comments on commit 291dfca

Please sign in to comment.