Skip to content

Commit

Permalink
feat(examples): move examples/basic to demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Jul 30, 2018
1 parent 2d3374a commit f5af817
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 26 deletions.
51 changes: 41 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ fmt: ##@0 global format code using prettier (js, css, md)
@${NODE_MODULES_BIN}/prettier --color --write \
"packages/**/*.js" \
"packages/*/README.md" \
"examples/**/*.js" \
"demo/**/*.js" \
"README.md"

fmt-check: ##@0 global check if files were all formatted using prettier
@echo "${YELLOW}Checking formatting${RESET}"
@${NODE_MODULES_BIN}/prettier --color --list-different \
"packages/**/*.js" \
"packages/*/README.md" \
"examples/**/*.js" \
"demo/**/*.js" \
"README.md"

ls: ##@0 global list packages & extensions
Expand Down Expand Up @@ -105,6 +105,14 @@ test-all: ##@0 run all checks/tests
########################################################################################################################

pkg-watch-%: ##@1 packages enable watch mode for a specific package
@${MAKE} MAKEFLAGS="-j 2" ext-commonjs-watch-${*} ext-es-watch-${*}

pkg-commonjs-watch-%: ##@1 packages enable watch mode for a specific package (commonjs)
@echo "${YELLOW}enabling watch mode (commonjs) for ${WHITE}@mozaik/${*}${RESET}"
@cd "packages/${*}" && yarn run build:commonjs:watch

pkg-es-watch-%: ##@1 packages enable watch mode for a specific package (es)
@echo "${YELLOW}enabling watch mode (es) for ${WHITE}@mozaik/${*}${RESET}"
@cd "packages/${*}" && yarn run build:es:watch

pkg-test-%: ##@1 packages run tests for a specific package
Expand Down Expand Up @@ -165,7 +173,23 @@ ext-build-%: ##@2 extensions build a specific extension
@cd "extensions/${*}" && yarn run build

ext-watch-%: ##@2 extensions enable watch mode for a specific extension
@echo "extensions/${*}"
@${MAKE} MAKEFLAGS="-j 2" ext-commonjs-watch-${*} ext-es-watch-${*}

ext-dev-%: ##@2 extensions start dev mode for a specific extension
@${MAKE} MAKEFLAGS="-j 6" \
ext-commonjs-watch-${*} \
ext-es-watch-${*} \
pkg-commonjs-watch-ui \
pkg-es-watch-ui \
demo-start-ui \
demo-start-server CONF="conf/config-${*}.yml"

ext-commonjs-watch-%: ##@2 extensions enable watch mode for a specific extension (commonjs)
@echo "${YELLOW}enabling watch mode (commonjs) for ${WHITE}@mozaik/ext-${*}${RESET}"
@cd "extensions/${*}" && yarn run build:commonjs:watch

ext-es-watch-%: ##@2 extensions enable watch mode for a specific extension (es)
@echo "${YELLOW}enabling watch mode (es) for ${WHITE}@mozaik/ext-${*}${RESET}"
@cd "extensions/${*}" && yarn run build:es:watch

ext-pub-%: ##@2 extensions publish an extension (eg. ext-pub-gitlab)
Expand All @@ -181,17 +205,24 @@ ext-pub-%: ##@2 extensions publish an extension (eg. ext-pub-gitlab)

########################################################################################################################
#
# EXAMPLES
# DEMO
#
########################################################################################################################

example-install-%: ##@3 examples install dependencies for a specific example
@echo "${YELLOW}Installing ${*} example dependencies${RESET}"
@cd "examples/${*}" && yarn install
demo-install: ##@3 demo install demo dependencies
@echo "${YELLOW}Installing demo dependencies${RESET}"
@cd demo && yarn install

demo-start-ui: ##@3 demo start demo react app
@echo "${YELLOW}Starting demo react app${RESET}"
@cd demo && yarn start

demo-start-server: ##@3 demo start demo mozaik server
@echo "${YELLOW}Starting demo mozaïk server (${CONF})${RESET}"
@cd demo && node server.js ${CONF}

example-start-%: ##@3 examples start a specific example
@echo "${YELLOW}Starting ${*} example${RESET}"
@cd "examples/${*}" && yarn start
demo-start: ##@3 demo start demo
@${MAKE} MAKEFLAGS="-j 2" demo-start-ui demo-start-server

########################################################################################################################
#
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ extension: &extension travis

# change those values of you want to use another user/repo
travisOwner: &travisOwner plouc
travisRepo: &travisRepo mozaik-ext-travis
travisRepo: &travisRepo mozaik

dashboards:
- columns: 2
rows: 2
- columns: 4
rows: 3
title: travis demo
widgets:
-
Expand All @@ -31,15 +31,15 @@ dashboards:
owner: *travisOwner
repository: *travisRepo
columns: 1
rows: 1
x: 1
rows: 3
x: 3
y: 0
-
extension: *extension
widget: BuildHistogram
owner: *travisOwner
repository: *travisRepo
columns: 2
rows: 1
x: 0
y: 1
# -
# extension: *extension
# widget: BuildHistogram
# owner: *travisOwner
# repository: *travisRepo
# columns: 2
# rows: 1
# x: 0
# y: 1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"packages": [
"packages/*",
"extensions/*",
"examples/*",
"storybook"
"demo"
],
"version": "0.0.0",
"npmClient": "yarn"
Expand Down

0 comments on commit f5af817

Please sign in to comment.