@ied/launchpad

2.8.8 • Public • Published

🚨 This is a temporary solution, waiting a proper web service

How to

yarn add @fulll/launchpad
import { Launchpad, toggle } from '@fulll/launchpad'
<Launchpad
  locale={locale}
  displayAppNames={false}
  platform={platform} // if "fr" it will display practitioner bookmarks
  onAccountingFirmChange={() => console.log('onAccountingFirmChange')}
/>

🚨🚨🚨 React version problem between project, temporary solution

If your project use react 16 use launchpad version 2.4.17 or 2.4.19

If your project use react 17 use launchpad version 2.4.18

Dev localy

  • use node 10
  • launch app on firefox (doesn't work with Chrome)
  • make sure you have previously logged in with the browser you are using

In order to test localy Launchpad in App.js instead of passing this.state.module use the mocks

🚨 Projects to update when bumping launchpad version

Front

  • [ ] bank
  • [ ] bridge-admin.web
  • [ ] buro.web
  • [ ] crm.web
  • [ ] dashboard
  • [ ] document-manager.web
  • [ ] forecast
  • [ ] image-posting.web
  • [ ] indicator
  • [ ] invoicing.web
  • [ ] marketing.web
  • [ ] marketplace.web
  • [ ] messenger.web
  • [ ] task-manager.web

Back

  • Dashboard V1
  • Simple Accounting
  • Cashdesk
  • Invoicing V1
  • Data Collector

Use token in .env to test launchpad locally

Shell script to optimize front-end updates on above applications

on MacOS :

  1. install gh brew install gh and hub brew install hub
  2. make sure to login using gh auth
  3. in your directory, make sure you have all the applications listed above
  4. change the following variables:
  • VERSION: launchpad version
  • REF: reference issue
  • REVIEWERS: pull request reviewers
  1. manually add correct values to this line sed -i '' 's/launchpad": "^2.4.8/launchpad": "^2.4.12/g' package.json
  2. to enable automatic generation of pull requests, you must install on your macos gh brew install gh
  3. copy/paste the following script in a new file updateLaunchpad, and put it in the same directory than your projects
  4. right click on the file , get information, unlock clicking on lock (bottom right)
  5. from your terminal launch : chmod 700 script_name (to give required access)
  6. launch the script from your terminal by running ./updateLaunchpad

NB

  • if you already have deployed the latest version of the launchpad on an app for testing purposes, you can remove it from the for loop in the script
  • if a project updates its node version, please update the script
  • monorepos are supported
#!/bin/bash

TITLE=config/update-launchpad
VERSION=$'2.4.13'
NEWLINE=$'\n'
REF=$'[SH#4176](https://github.com/fulll/superheroes/issues/4176)'
BODY="Related to ${REF}${NEWLINE}${NEWLINE}Version${NEWLINE}Preprod${NEWLINE}${NEWLINE}Modification${NEWLINE}Update @fulll/launchpad to ${VERSION}."
REVIEWER='CySsD'

if [ -f ~/.nvm/nvm.sh ]; then
  echo 'sourcing nvm from ~/.nvm'
  . ~/.nvm/nvm.sh
fi

for APP in crm.web marketing.web messenger.web task-manager.web bridge-admin.web document-manager.web image-posting.web bank dashboard indicators forecast marketplace.web invoicing.web
  do
    if [ $APP = "bank" ] || [ $APP = "indicators" ] || [ $APP = "forecast" ] || [ $APP = "dashboard" ]
    then
      cd "$HOME/Projects/$APP/front-end" || exit
    else
      cd "$HOME/Projects/$APP" || exit
    fi
    if [ $APP = "bank" ] || [ $APP = "indicators" ] || [ $APP = "forecast" ] || [ $APP = "dashboard" ] ||  [ $APP = "marketplace.web" ]
      then
        if command -v nvm ; then
          nvm use 12
        else
          echo "Cannot change Node version"
        fi
    elif [ $APP = "invoicing.web" ]
      then
        if command -v nvm ; then
          nvm use 14
        else
          echo "Cannot change Node version"
        fi
    else
        if command -v nvm ; then
          nvm use 10
        else
          echo "Cannot change Node version"
        fi
    fi
      git checkout master
      hub sync
      git checkout -b $TITLE
      sed -i '' 's/launchpad": "^2.4.12/launchpad": "^2.4.13/g' package.json
      yarn
      git add . && git commit -m "$BODY"
      git push --set-upstream origin $TITLE
      gh pr create --base master --title "$TITLE" --body "$BODY" --reviewer $REVIEWER --assignee "@me"
  done

Readme

Keywords

none

Package Sidebar

Install

npm i @ied/launchpad

Weekly Downloads

1

Version

2.8.8

License

none

Unpacked Size

8.9 MB

Total Files

9

Last publish

Collaborators

  • vibbou
  • lfalorni