Skip to content

Commit

Permalink
Chore(demo): Link packages to missing modules
Browse files Browse the repository at this point in the history
  * fixes `cannot find module` error
  * missing `@lmc-eu/spirit-common` in `@lmc-eu/spirit-form-validations`
  * missing `@lmc-eu/spirit-common` in `@lmc-eu/spirit-web`
  * missing `@lmc-eu/spirit-design-tokens` in `@lmc-eu/spirit-web`
  • Loading branch information
literat committed Jan 11, 2024
1 parent 599673f commit c255f8c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
2 changes: 2 additions & 0 deletions apps/web-twig-demo/docker/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
volumes:
- ./../:/srv/spirit-web-twig-demo/:delegated
- ./../../../packages/web:/srv/spirit-web/:delegated
- ./../../../packages/common:/srv/spirit-common/:delegated
- ./../../../packages/design-tokens:/srv/spirit-design-tokens/:delegated
- ./../../../packages/demo:/srv/spirit-demo/:delegated
- ./../../../packages/form-validations:/srv/spirit-form-validations/:delegated
# If you develop on Mac or Windows you can remove the node_modules/ directory
Expand Down
34 changes: 32 additions & 2 deletions packages/web-twig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,39 @@ endif
encore-install: ## Install demo dependencies
cd $(APP_DOCKER_DIR) && $(DOCKER_COMP) exec $(DOCKER_ENCORE_SERVICE) yarn install

encore-link: ## Link demo dependencies
cd $(APP_DOCKER_DIR) && $(DOCKER_COMP) exec $(DOCKER_ENCORE_SERVICE) sh -c "cd /srv/spirit-web && yarn link && cd /srv/spirit-web-twig-demo && yarn link @lmc-eu/spirit-web && cd /srv/spirit-form-validations && yarn link && cd /srv/spirit-web-twig-demo && yarn link @lmc-eu/spirit-form-validations && cd /srv/spirit-demo && yarn link && cd /srv/spirit-web-twig-demo && yarn link @lmc-eu/spirit-demo"
## Every time you create a new package and use it in the demo, you need to link it here.
## This is because the demo is not using the packages from npm, but from the local filesystem.
## It ensures that the demo is always using the latest version of the package.
## Thus the realtime local development is possible.

encore-link: ## Link demo dependencies
cd $(APP_DOCKER_DIR) && \
$(DOCKER_COMP) exec $(DOCKER_ENCORE_SERVICE) sh -c "cd /srv/spirit-web && \
yarn link && \
cd /srv/spirit-web-twig-demo && \
yarn link @lmc-eu/spirit-web && \
\
cd /srv/spirit-form-validations && \
yarn link && \
cd /srv/spirit-web-twig-demo && \
yarn link @lmc-eu/spirit-form-validations && \
\
cd /srv/spirit-demo && \
yarn link && \
cd /srv/spirit-web-twig-demo && \
yarn link @lmc-eu/spirit-demo && \
\
cd /srv/spirit-design-tokens && \
yarn link && \
cd /srv/spirit-web-twig-demo/node_modules/@lmc-eu/spirit-web && \
yarn link @lmc-eu/spirit-design-tokens && \
\
cd /srv/spirit-common && \
yarn link && \
cd /srv/spirit-web-twig-demo/node_modules/@lmc-eu/spirit-web && \
yarn link @lmc-eu/spirit-common && \
cd /srv/spirit-web-twig-demo/node_modules/@lmc-eu/spirit-form-validations && \
yarn link @lmc-eu/spirit-common"
encore-build: ## Build demo assets
cd $(APP_DOCKER_DIR) && $(DOCKER_COMP) exec $(DOCKER_ENCORE_SERVICE) yarn build

Expand Down

0 comments on commit c255f8c

Please sign in to comment.