New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@daisypayments/petals

Package Overview
Dependencies
Maintainers
6
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daisypayments/petals

Reusable front end components to be used across Daisy Payments

  • 0.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
6
Weekly downloads
 
Created
Source

@daisypayments/petals

Reusable UI Components to be used across Daisy Payments

Dependencies

Run yarn install to install depencencies.

Usage

Add this to your project by running:

yarn add @daisypayments/petals

Add peer dependencies:

yarn add lodash polished prop-types react-media styled-components

Development

We are using storybook as a UI development environment. Open storybook by running:

yarn storybook

It should open automatically at http://localhost:6006.

Local development along other projects

To add this package as a local dependency in your local projects we use yalc.

Why yalc? Take a look a this issue: "yarn knit": a better "yarn link" #1213

In short words: yalc makes a copy of this package as it was published into a npm registry, avoiding the usage of yarn link which creates a symlink including source files and node_modules leading to multiple dependencies being used in the development environment.

Steps

Follow these steps to use @daisypayments/petals in another frontend-project package:

  • Install yalc cli tool globally by running:

    yarn global add yalc
    

<<<<<<< Updated upstream

  • Publish @daisypayments/petals to your local ~/.yalc folder by running in @daisypayments/petals folder:

    yalc publish
    
  • Go to frontend-project folder and link @daisypayments/petals published version:

    yalc link @daisypayments/petals
    

    Run yarn install to install dependencies, then add .yalc/ and yalc.lock to frontend-project's .gitignore

  • Publish changes and update linked installations of @daisypayments/petals by running in its folder:

    yarn push # equivalent to `yarn build && yalc push`
    

    To do this automatically when files change in src/ folder run:

    yarn dev # equivalent to `nodemon --watch src --exec yarn push`
    

Caveats

  • yalc link @daisypayments/petals will leave a symlink inside node_modules, if you ever want to go back to the version downloaded from npm, remove it and install it again.
  • Some projects need to recompile: since components are being imported from node_modules they will be cached by bundlers and changes won't be reflected right away.

Publishing to NPM

  • Once your PR has been approved, squash and merge the feature branch into develop.

  • Locally, checkout develop, pull, and increment the version of the package:

    git checkout develop
    git pull
    yarn version
    
  • Push the updated develop branch and the associated tag:

    git push
    git push origin <new_tag_name>
    
  • Create a new PR to merge develop into master with a title following the format "Master < Develop <new_tag_name>"

  • Once the team approves, merge the PR (normally, without squashing or rebasing). CircleCI will automatically publish to NPM if all tests pass. Always verify that everything worked here and on npm.

FAQs

Package last updated on 26 Mar 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc