Monorepo of all front-end library of Jahia
This project is composed of (click on the link for there documentation):
-
data-helper - 💡- Provide helpers (react hooks, utily function, ...) to manipulate jahia datas
-
test-framework - 🔧 - Jest + Enzyme configuration for Jahia needs
-
react-material - 💩 - DEPRECATED use moonstone/ui-extender instead
Each package in the javascript-components repository is published to the public npm registry and scoped with @jahia
.
You can install any package with:
npm i @jahia/package-name
or with yarn : yarn add @jahia/package-name
.
We are using Yarn for each project at Jahia and in this project specially the yarn workspaces feature. You can install yarn with npm i -g yarn
.
It won't work with npm, please only use yarn for building.
Before starting developing, you have to install dependencies:
yarn
The you can start develop and test using.
yarn tdd
Make sure each file respect the eslint configuration.
Sometime, when you are working on a JavaScript-Component package, you want to directly test your package on the other project you are working on. Yalc is here to help you do that.
In order to build every package, in the root folder, run:
yarn build
The final build will reside in the build
subfolder of each package.
Modules can also be built independently by going to packages subfolder, and use yarn build
.
When you make changes to javascript-components, a new version is built and published automatically. Releases and publish are done thanks to auto. Version are incremented according to PR labels.
You need to provide environment variables with GIT and NPM keys :
GH_TOKEN=xxx
NPM_TOKEN=xxx
They can be set in your environment or in a .env
file.
Ensure that you're logged into the Jahia organization on the public npm registry:
npm set registry https://registry.npmjs.org/
npm adduser --registry https://registry.npmjs.org/
You can request an npm account for the Jahia organization from IT.
Ensure that your node_modules
are up to date for the javascript-components repo as a whole and for the specific package you want to publish.
Run yarn build
.
Run yarn publish-script
in the package that you want to publish. Be sure to stop the CircleCI build to avoid the creation of unnecessary branches, etc.
👤 Jahia Group
- Website: https://www.jahia.com
- Twitter: @Jahia
- Github: @Jahia
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2019 Jahia Group.
This project use JAHIA'S DUAL LICENSING, see LICENSE.txt file.
This README was generated with ❤️ by readme-md-generator