New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

odp-shared-components-poc

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odp-shared-components-poc

A collection of reusable React components.

latest
npmnpm
Version
0.6.0
Version published
Weekly downloads
1
Maintainers
0
Weekly downloads
 
Created
Source

odp-shared-components-poc

A collection of reusable React components.

Project Structure

/odp-shared-components
├── /dist                # Compiled output
├── /src                 # Source code
│   ├── /components      # Individual components
│   │   ├── ProductName  # Example component
│   │   │   ├── index.js
│   │   │   ├── styles.module.css
│   │   ├── ...          # Other components
│   ├── index.js         # Main export file
├── .babelrc
├── .eslintrc
├── package.json
├── rollup.config.js

Installation

To install in your project:

npm install odp-shared-components-poc --legacy-peer-deps

Usage

import React from "react";
import ProductName from "odp-components";

const App = () => {
    return <ProductName name="Example Product" className="custom-class" />;
};

export default App;

Adding a New Component

To add a new component:

  • Create a new folder inside src/components/.
  • Implement the component in index.js.
  • If necessary, create a styles.module.css for scoped styles.
  • Export the new component in src/index.js.

To work on this package and test it in another project:

  • Inside the odp-shared-components-poc directory, run:
    npm link
    
  • Inside the consuming project, run:
    npm link odp-shared-components-poc
    
  • Restart the consuming project's development server if needed.

Publishing to NPM

To publish a new version:

  • Ensure all changes are committed.
  • Update the version in package.json (e.g., 1.0.1 → 1.0.2).
  • Run:
    npm publish --access public
    

FAQs

Package last updated on 06 Feb 2025

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