Skip to content

Commit

Permalink
feat(packages): add command to deploy all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Dec 5, 2017
1 parent 61f5f0b commit 7467315
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -3,7 +3,7 @@ node_js:
- '8'
script:
- make init
- make demo-build
- make website-build
- make storybook-build
#- yarn run fmt:check
#- yarn run test:cover
Expand Down
24 changes: 17 additions & 7 deletions Makefile
@@ -1,6 +1,6 @@
SOURCES = packages

.PHONY: help init build-all clean-all website website-build website-deploy storybook storybook-build storybook-deploy deploy-all
.PHONY: help init packages-build packages-publish clean-all website website-build website-deploy storybook storybook-build storybook-deploy deploy-all

########################################################################################################################
#
Expand Down Expand Up @@ -39,18 +39,13 @@ init: ##@init cleanup/install/bootstrap
@make clean-all
@yarn install
@./node_modules/.bin/lerna bootstrap
@make build-all
@make packages-build
@cd website && yarn install

deploy-all: ##@deploy deploy website & storybook
@make website-deploy
@make storybook-deploy

build-all: ##@build build all packages
@echo "${YELLOW}Building all packages${RESET}"
@$(foreach source, $(SOURCES), $(call clean-source-lib, $(source)))
@./node_modules/.bin/lerna run build

########################################################################################################################
#
# CLEANUP
Expand All @@ -76,6 +71,21 @@ define clean-source-all
rm -rf $(1)/*/package-lock.json
endef

########################################################################################################################
#
# PACKAGES
#
########################################################################################################################

packages-build: ##@packages build all packages
@echo "${YELLOW}Building all packages${RESET}"
@$(foreach source, $(SOURCES), $(call clean-source-lib, $(source)))
@./node_modules/.bin/lerna run build

packages-publish: ##@packages publish all packages
@echo "${YELLOW}Publishing packages${RESET}"
@./node_modules/.bin/lerna publish ---exact

########################################################################################################################
#
# WEBSITE
Expand Down

0 comments on commit 7467315

Please sign in to comment.