Tourstream MHB Lib
This package contains components which are used by the MHP Landing Pages.
Install the component library within each brand of the MPH Landing Pages, e.g.
cd design_plus npm i -S @tourstream/tourstream-mhb-lib
You can also link a local version of this package directly directly into your frontend app. Assuming that the local versions is on the same level like your MPH Landing Pages:
cd design_plus npm link ../../tourstream-mhb-lib
Note: This feature is currently not working when the including package also uses styled-components.
- Google Cloud SDK: Install the Google Cloud SDK.
- Node 10 LTS: Install Node.js on your local machine.
Get the repository and install the dependencies:
git clone firstname.lastname@example.org:tourstream/tourstream-mhb-lib.git cd tourstream-mhb-lib npm i
There is no extra configuration required
Run Linting tests:
npm run lint
Note: The Linting tests will throw lots of errors and warnings. Maybe you should ignore them ;-)
npm link is currently not working, you can use the following work around:
- Build the package
- Pack the package
- Install the package temporary within a brand directory of the MPH Landing Pages you want to test with
npm run build npm pack cd ../meeting-point-hotel-brands/design_plus/ npm i ../../tourstream-mhb-lib/tourstream-tourstream-mhb-lib-1.2.28.tgz
Note: Don't forget to revert this local installation of the package within MPH Landing Pages. Instead of this you should update the package after deploying it to npmjs.com
Before merging your changes to master you should update the version number of the package in the package.json and package-lock.json (use:
After merging your changes you can build and deploy the package to npmjs.com
npm run build npm publish
Finally, you have to update the package within the related brand directories of the MPH Landing Pages.