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

@ezcater/recipe

Package Overview
Dependencies
Maintainers
11
Versions
514
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ezcater/recipe

ezCater's React UI Component library

  • 18.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
326
decreased by-64.87%
Maintainers
11
Weekly downloads
 
Created
Source

Recipe logo

Delicious UI components, from ezcater.
Explore website »


NPM version NPM version NPM downloads

Installation

Recipe is available as an npm package and is used with emotion.

yarn add @ezcater/recipe @emotion/react @emotion/styled

Importing components in downstream projects

Import the Recipe package, just as you would any other package dependency:

import {EzButton} from '@ezcater/recipe';

export const MyComponent = () => (
  <div>
    <EzButton use="primary" onClick={() => alert('You clicked me!')}>
      Click Me!
    </EzButton>
  </div>
);

Contributing / Creating Components

This project uses plop to generate new React components. The functionality is exposed as the create-component npm script from package.json. This will:

  • copy the component template files from templates/component to src/components/YOUR_COMPONENT_NAME,
  • rename all files to match your component's name
  • replace all occurrences of Component inside the component's files with your component's name.

To create a new component, run yarn create-component inside packages/recipe. You'll see a CLI that guides you through the process.

After the CLI has finished, all files will have been created in the location you specified. You'll need to add an export for your component to src/index.tsx. For example:

// inside src/index.tsx
export {default as EzButton} from './components/EzButton';

Developing

The recipe contributions docs have a more thorough breakdown of the contribution guidelines.

To begin developing locally, use the following commands:

  • Run yarn install in the root dir
  • Run yarn develop in the root dir
    • This will also open up the recipe-playroom: http://localhost:9000
    • This will also allow you to view the recipe-doc-site in the browser at http://localhost:6006/
      • Changes made to the component markdown as well as the components used in the markdown should be visible here.

Recipe uses yarn workspaces and lerna internally to manage packages. The above commands can be executed individually using the yarn workspaces command, passing in the name of the package and the command to execute.

To run the develop script in only recipe's source, you can use:

yarn workspace @ezcater/recipe develop

Publishing

After contributing updates to recipe, you'll need to publish the recipe package for changes to take effect in downstream projects.

Recipe uses the Changesets Release github action to automate the process of creating a pull request for an up-versioned Recipe release. This process uses the semantic versioning metadata captured as part of our development process. When an automated versioning PR is merged, a new Recipe release will be published to npm on your behalf.

License

Recipe is licensed under the MIT license.

FAQs

Package last updated on 09 Nov 2023

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