
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@uob-web-and-digital/component-library
Advanced tools
A component library using React and Storybook.
This is the frontend component library for the University of Birmingham website built using Storybook 7 and SASS.
git clone git@github.com:uob-itservices/component-library.git
npm install
from the project rootRun npm run storybook
from the project root. This will run a new instance of Storybook that can be accessed from localhost:6006
.
Changes made locally are automatically compiled and the browser instance of Storybook will automaticaly refresh, hot-loading changes very quickly where possible.
Components should always be created within the src/components
folder.
You can create a new folder within src/components
that is based on the chosen name for your component. The format of this folder name, react component and story should always be PascalCase i.e. MyNewComponent
. SASS files should always be camelCase i.e. myNewComponent
Within the component folder you must create the following 3 files:
ComponentName
|_ {ComponentName}.tsx
|_ {ComponentName}.stories.ts
|_ {componentName}.scss
This file is where the Component Structure is defined.
This file allows developers to pass in mockup content to the component that will render within Storybook. More information is available in the Storybook docs Storybook JS - Defining Stories
This is where component styling is defined using SASS/CSS.
The visible Storybook for sharing changes is private and is accessed at https://stunning-invention-1w42em5.pages.github.io/ you will need to be a member of the uob-itservices GitHub organisation and have access to the repository.
This is automatically deployed and built when changes are pushed to the develop
branch of the GitHub repository.
Before pushing a new commit to this component-library, please ensure that you run the following ES Lint command in your terminal:
npm run lint
This will highlight any linting issues that may arise when making file changes that will need to be fixed.
To adhere to the commit message best practice commitlint is used. More information on commit message linting can be found here at https://github.com/conventional-changelog/commitlint/#what-is-commitlint
The repository will need publishing to the NPMJS package library https://www.npmjs.com/package/@uob-web-and-digital/component-library before it can be used in the UoB website.
This is a private package so a read-only NPM access token will need be created in order to install the package.
When the library in ready for a new release of the NPM package, you will need to increase the version number in the package.json and run a npm install
to ensure the project gets updated with this version. After this you will need to create a pull request into the develop
branch and then another pull request from the develop
branch into main
As this is a manual process, ensure that the main
branch of the repository is always in sync with the currently published package.
Releasing to the NPM registry are managed by GitHub Actions. You will need to create a new release and use the new release version as the tag. Once the release is published a GitHub Action will automatically run all the steps to publish the package on NPM.
In order to use the package you must have a NPM Access Token with read-only access to @uob-web-and-digital/component-library
.
To install the package run npm install @uob-web-and-digital/component-library
.
After installation you will need to add the following to your layout file;
import '@uob-web-and-digital/component-library/dist/main.css';
Fonts are base64 encoded so they are not hosted on a third party.
To encode fonts to base64 you can run;
base64 -i Font.woff2 -o Font64txt
FAQs
A component library using React and Storybook.
The npm package @uob-web-and-digital/component-library receives a total of 44 weekly downloads. As such, @uob-web-and-digital/component-library popularity was classified as not popular.
We found that @uob-web-and-digital/component-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.