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

react-test-library-component

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-test-library-component

Default configuration for creating a react library compoenet

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

React Library Component

This is a basic configuration project to get started on publishing a library of a react component on npm.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Install the package from npm

npm install react-test-library-component

Get started on your new library

Fork or clone the repository https://github.com/andreeasimona/react-test-library-component

Install the dependencies

npm install

Follow the instructions in src/index.js to add your first changes.

In package.json change the following lines

{
....
  "name": "Change this for your library name for example your-component-name",
  "version": "Change this for your version number",
....
  "author": "Add yourself as the author",
....
  "repository": {
    "url": "Change this for your github repository"
  },
....
  "bugs": {
    "url": "Change this for your github repository"
  },
  "homepage": "Change this for your github repository"
}
....

Publish on npm

Login into your account

npm login

Publish

npm run build
npm publish

Usage in local enviroment

In the current project

npm run build
npm link

Use this in the project where you want to use/test your new library

npm link your-component-name

Import the component in the target project

....
import YourComponentName from 'your-component-name';
....
<YourComponentName />
....

License

This project is licensed under the MIT License

Keywords

react

FAQs

Package last updated on 09 Feb 2018

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