From 7467315c5e191d0876e0938ae9c6b8b95846d118 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 713a81797c..7a7834901c 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 3bdb702bd0..0c3e1ad446 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