1.4.14 • Published 4 months ago
framework-entersol-web v1.4.14
DBL COMPONENTS
INSTALATION
- BEFORE cloning this repo, create a new folder
- In that folder, clone this repository (git clone git@bitbucket.org:entersol-mx/framework-entersol.git)
- In the outer folder, add this package.json
{
"scripts": {
"babel": "yarn --cwd ./framework-entersol babel",
"build": "yarn --cwd ./framework-entersol build"
},
"dependencies": {
"@popperjs/core": "2.11.5",
"bootstrap": "5.1.3",
"flat": "^5.0.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router": "^5.2.1",
"react-router-dom": "^5.3.0",
"sass": "^1.67.0",
"swiper": "^6.8.3"
},
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.5",
"@babel/preset-typescript": "^7.12.1",
"autoprefixer": "^10.0.1",
"babel-loader": "^8.1.0",
"babel-plugin-inline-json-import": "^0.3.2",
"babel-plugin-polyfill-corejs3": "^0.2.0",
"node-sass-import": "^2.0.1",
"postcss": "^8.1.6",
"postcss-cli": "^8.2.0",
"react-is": "^17.0.1",
"sass-loader": "^10.0.5"
}
}
- In the outer folder, run
yarn install
- In the
framework-entersol
folder, runyarn install
,yarn clear
andyarn build
USING THE FRAMEWORK
To use this framework:
- Run
yarn link
in the repository folder (It will display a message like: Linked "framework-entersol-web") - In Validex frontend, run
yarn link "framework-entersol-web"
Your project is now linked with the framework
MAKING CHANGES
After making changes to a component in the framework-entersol project:
- In the outer folder, run
yarn babel
- Your changes will appear automatically in the frontend
UNLINKING PROJECT
Once you have finished to use the project:
- In your frontend project, run
yarn unlink "framework-entersol-web"
- Run
yarn install --force
Then, your frontend project will run normally
DEPLOYING CHANGES
Before you will push your changes, you will need to change the package.json's version manually:
{
"name": "framework-entersol-web",
"version": "1.4.12", // THIS VERSION NEEDS TO BE CHANGED
"description": "Framework based on bootstrap 5",
...
}
- Ensure your changes are committed and pushed to the repository to keep your work up to date.
- In your local terminal, add the necessary credentials to authenticate and deploy the project to npm.
- To publish the new changes, use the following command:
npm publish --access public
. This will make the package publicly available on npm. - If you need to see the changes in any environment (development, production, QA, etc.), deploy the frontend environment. Make sure to apply any change that updates the package.json for the framework to reflect the new package version.