stellar-web-shared v0.20.0
Prerequisities
Install Node.js
Follow the rules here.
Install NPM
Detailed information could be found here.
Install Dependencies
npm install --force
Local development
If you want to test your changes locally in a consumer app prior to pushing any code or creating a new globally available package, you should follow these steps:
- from the root directory of this repo, run
npm run build-libto build a production-alike version of the package - then run
sudo npm linkto make your local package available globally on your machine - open a new terminal at the root directory of your consumer app and run
npm link stellar-web-shared --forceto link to that global package on your machine instead of downloading it from NPM registry. You may also need to runyarn installto make yarn.lock file up-to-date - launch your app, test the changes, ensure local package is used
- once finished, from the root of your consumer app run
npm unlink --no-save stellar-web-sharedto unlink the package from your consumer app so that it can download from registry again. Discard any yarn.lock updates and runyarn installagain - (optional) run
npm unlinkfrom the root of shared repo to clean up global NPM links. Alternatively, you can launch a local Storybook server to check your UI previews by simply runningnpm run storybook. Note: in order for it to properly open in browser, you may need to hard refresh your browser cache.
Publishing to NPM
Automatic publish takes place on every push to your PR and on every merge to master branch, so in most cases you don't need to worry about it. In case there is a necessity to publish from your machine, here are the steps to follow:
- create
./.loadenv.shfile at the root directory similar to how we do that in our web app. Make sure to addNPM_ACCESS_TOKENvariable. Token value can be found in 1Password - run
source ./.loadenv.shto expose NPM token and any other important variables to your node environment. This will allow you to execute any further commands to NPM without any need to log in. - run
npm versionwith specific flags or manually change package version inpackage.jsonin order to avoid conflicts with already published package versions. - run
npm publishand ensure new package version is available here.
NPM account
If you would like to log in to NPM using your browser and see what we have from within, feel free to find credentials in 1Password.
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago