From 36e87edb581c80cb58c7fb9cdc1e706c41c943a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Benitte?= Date: Wed, 6 Dec 2017 03:30:46 +0900 Subject: [PATCH] feat(packages): add command to deploy all packages --- .travis.yml | 2 +- Makefile | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 713a81797..7a7834901 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index 3bdb702bd..0c3e1ad44 100644 --- a/Makefile +++ b/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 ######################################################################################################################## # @@ -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 @@ -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