@ied/launchpad

Internal ied launchpad for React and symfony app

Stats

StarsIssuesVersionUpdatedCreatedSize
@ied/launchpad
2.4.192 months ago4 years agoMinified + gzip package size for @ied/launchpad in KB

Readme

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

@ied/launchpad

Project bootstraped with react-create-app and react-app-rewired

How to

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

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 intead 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

Applications Node versions

  • Node 14: invoicing.web
  • Node 12: dashboard, forecast, indicators, bank
  • Node 10: bridge-admin.web, buro.web, crm.web, document-manager.web, image-posting.web, marketing.web, marketplace.web, messenger.web, task-manager.web

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/inextensodigital/superheroes/issues/4176)'
BODY="Related to ${REF}${NEWLINE}${NEWLINE}Version${NEWLINE}Preprod${NEWLINE}${NEWLINE}Modification${NEWLINE}Update @ied/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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.