Internal fulll launchpad for React and symfony app
```
yarn add @fulll/launchpad
`jsx`
import { Launchpad, toggle } from '@fulll/launchpad'
displayAppNames={false}
platform={platform} // if "fr" it will display practitioner bookmarks
onAccountingFirmChange={() => console.log('onAccountingFirmChange')}
/>
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
- 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
- [ ] 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
- Dashboard V1
- Simple Accounting
- Cashdesk
- Invoicing V1
- Data Collector
Use token in .env to test launchpad locally
on _MacOS_ :
1. install gh brew install gh and hub brew install hubgh auth
2. make sure to login using
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
5. manually add correct values to this line sed -i '' 's/launchpad": "^2.4.8/launchpad": "^2.4.12/g' package.jsonbrew install gh
6. to enable automatic generation of pull requests, you must install on your macos gh updateLaunchpad
7. copy/paste the following script in a new file , and put it in the same directory than your projects./updateLaunchpad
8. right click on the file , get information, unlock clicking on lock (bottom right)
9. from your terminal launch : chmod 700 script_name (to give required access)
10. launch the script from your terminal by running
- 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'
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
``