Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
bulb-design-test
Advanced tools
Welcome to the Bulb Design repository!
This repo contains;
The latest version of the library is published at http://patterns.bulb.co.uk where you can browse the library and try new pattern arrangements in the playgrounds.
To use the patterns in your project, first, add the @bulb/design
package.
Note: this is a private package, and you will need a login to NPM and be added to the Bulb organisation.
yarn add @bulb/design
You can then simply import the components you wish to use, if you're using the full project.
import { Button } from '@bulb/design';
<Button {...props} />;
import { AppLinks } from '@bulb/design/modules/AppLinks';
<AppLinks {...props} />;
To run the library locally run the following command.
yarn run start
This will run it in a hot mode and will update any browser windows (on modern browsers) with any changes you make locally. For older browsers such as ie10 you will need to manually refresh the browser window following local changes.
Note: currently for the non typescript components, static assets such as images and icons are included in the compiled file, but this may change in the future so it doesn't make the file so large.
You can create new module patterns by using the yarn new
command. It will
ask for the module name and create a new pattern in the src/modules/{name}/
directory.
If you create a pattern manually, it should either be in the src/modules
or src/styles
directory, and have the following structure,
/{pattern group}
+- /ComponentName
| +- index.tsx
| +- index.test.tsx
| +- index.vr-test.tsx
| +- README.md
When updating components, we update the adjacent CHANGELOG.md
file with an entry describing the change where appropriate.
This helps us when consuming components that have been changed by one another to see why and how components have changed.
For breaking component changes prefix we prefix the changelog entry with [BREAKING] or [MAJOR] to communicate the new behaviour.
# CHANGELOG
* [BREAKING] short description of breaking change
* short description of non breaking change
// ...previous changes
We utilise an internal library tool to create a great visual reference to all the patterns we've built in here.
When you add a new pattern to this repo, the README.md
should be filled with details of this pattern.
It is generally the same Markdown as with Github, with the addition of Specimens - read about those over here to make your documentation amazing. While we don't use catalog anymore, the api for our tool is based on it.
// TODO add documentation for library tool
Static values and CSS variables are in the src/styles
directory.
In your components, you can import these,
import { palette } from '../../styles/ts-palette';
The test command is simply
yarn test
You can add any of the Jest CLI options to test specific files.
Your tests should cover any interactions your component may have.
The test command is simply
yarn vr-test
Visual regression tests require machine setup to run, see the Testing Document for deatils about how to set these up and use them to test your components.
yarn start
FAQs
Welcome to the Bulb Design repository!
We found that bulb-design-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.