-
yarn
: run theyarn clean
, thenyarn lint
, thenyarn compile
. Always use this. -
yarn clean
: clean the output folders./es
and./js
. -
yarn lint
: lint the ts files -
yarn tsc
: compile the TypeScript in./ts
into ES2015 in the./es
folder. -
yarn babel
: compile the ES2015 in the./es
into JavaScript in the./js
folder. -
yarn compile
: run both the tsc and the babel steps. -
yarn test
: run unit tests. -
yarn watch
: continuously run unit tests.
Pour créer une nouvelle version :
- après un merge du core sur master, se mettre sur master (
git checkout master
),git fetch --all && git pull
pour que la branche master locale soit bien à jour. - run la commande
yarn version
. Un petit prompt demande quelle version mettre, il faut respecter le Semantic Versioning sinon Yarn ne monte pas la version. - la commande
yarn version
peut prendre un argument comme--major, --minor, --patch
pour incrémenter toute seule la version. - la commande pousse automatiquement le nouveau tag sur le Remote Git et met à jour le package.json. Rien à faire de plus.
Une fois que le pipeline Bitbucket du commit de la nouvelle version est passé, il faut aller sur la page du pipeline, et activer manuellement l'étape Publish qui va envoyer le nouveau Core sur le registry NPM.
On the core repository :
yarn link
In App or API (if you want to add or update @weskills/weskills-core):
- Go on the target repository (API and/or APP):
yarn link "@weskills/weskills-core"
npm login --registry https://npm.weskills.com/
Username: admin
Password: ********
Email: tech@weskills.com
cat ~/.npmrc
- Après avoir merge la PR sur master, lancer:
yarn version --patch || --minor || --major
- Lancer la pipeline pour déployer le core sur le registry Delia: https://bitbucket.org/delia-solutions/weskills-core/addon/pipelines/home#!