Skip to content

Latest commit

 

History

History
107 lines (69 loc) · 2.39 KB

README.md

File metadata and controls

107 lines (69 loc) · 2.39 KB

@make.org/widget

Before starting

💂‍♂️ Access to make.org tech env are restricted through VPN. Check this with make.org tech team before launching these commands.

👌 Check local.makeorg.tech is setted in hosts

Requirements : Please refers to getting started section

Useful docker commands

Please refers to Docker CLI (open in a new tab) and Docker Compose CLI (open in a new tab) commands.

Running dev instances

Dev mode :

$ docker-compose -f docker-compose.dev.yaml up -d --profile=widget-dev up -d
# and go to https://localhost:3000
# or go to https://local.makeorg.tech:3000/demo?WIDGET_PARAMS (iframe demo)

Dev mode with SSR :

$ docker-compose -f docker-compose.dev.yaml up -d --profile=widget-ssr up -d
# and go to https://localhost:3000
# or go to https://local.makeorg.tech:3000/demo?WIDGET_PARAMS (iframe demo)

After changes, you must rebuild your app in docker container :

# get the id of the running container
$ docker ps
# launch the build script in the container
$ docker exec -it CONTAINER_ID yarn workspace @make.org/widget build
# Restart the container
$ docker-compose -f docker-compose.dev.yaml up -d --profile=widget-ssr restart

Running functional tests

Start test environment

$ docker-compose -f docker-compose.dev.yaml --profile=widget-test up -d

Run all tests

$ yarn cypress:widget:run

or open Cypress

$ yarn cypress:widget:open

Configure Cypress : cypress.json

Environment variables for production

See: ./.env.local

Running controversial and popular sequences in Dev mode

In Dev mode, update sequenceKind param in initDevState in :

Apps/widget/initDevState

with corresponding param :

standard / consensus / controversy

i18n

Check translations

$ yarn workspace @make.org/widget translation

List unused keys in translation files

$ yarn workspace @make.org/widget  translation:unused-keys -d ./i18n -l fr

List keys without translation in code

$ yarn workspace @make.org/widget  translation:orphan-keys -d ./i18n -l fr