Catalog npm
Back to packageRELEASE DETAILS

1.0.55

npm

1clearscientist

A demo for publishing cool packages to npm registry

es6npmpackagepublishreactjs
Published14 Feb 2023
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

NPM Publish Boilerplate

All you need to know for publishing a React or any JavaScript component/hook to NPM registry.

If you want to test this package, run

 npm i my-cool-package-name

Steps:

  1. Clone this Repo.

  2. Modify /src folder or overwrite index.js according to your package's need.

  3. Install all Dependencies by running:

npm install
  1. Build it by running:
npm run build
  1. Login into to your NPM account using terminal/cmd.

  2. Publish it

npm publish

Src Code Snippets

What is actually published: A basic example

/src/index.js

In Index.js just add prop type others are exactly same.

import React from 'react'
import PropTypes from "prop-types"

function MyPackage(props) {
  return (
      <div>
          <h3>Hello {props.name}</h3>
          <p>I hope this helped you :)</p>       
      </div>
  )
}

MyPackage.propTypes = {
    name: PropTypes.string
};

export default MyPackage

package.json

In package.json file, we changed the "main" and webpack build script.

{
 "name": "my-cool-package-name",
 "version": "1.0.0",
 "description": "A demo for publishing cool packages to npm registry",
 "main": "./build/index.js",
 "scripts": {
   "build": "webpack"
 },
 "repository": {
   "type": "git",
   "url": "git+https://github.com/rohitsaini1196/npm-publish-boilerplate.git"
 },
 "keywords": [
   "npm",
   "publish",
   "reactjs",
   "es6",
   "package"
 ],
 "author": "Rohit Saini",
 "license": "ISC",
 "devDependencies": {
   "@babel/core": "^7.7.5",
   "@babel/preset-env": "^7.7.6",
   "@babel/preset-react": "^7.7.4",
   "babel-loader": "^8.0.6",
   "css-loader": "^3.3.0",
   "style-loader": "^1.0.1",
   "webpack": "^4.41.2",
   "webpack-cli": "^3.3.10"
 },
 "dependencies": {
   "prop-types": "^15.7.2",
   "react": "^16.12.0"
 },
 "bugs": {
   "url": "https://github.com/rohitsaini1196/npm-publish-boilerplate/issues"
 },
 "homepage": "https://github.com/rohitsaini1196/npm-publish-boilerplate#readme"
}

Ask me if you have any doubt.


Rohit Saini

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-KDxBtZ2aYyYz3LdJNdcF5op/LDLsSZtXWu+GYLhy1oKhM6dBLI+2E8aFCdukCiUCvD4gYu5+t/wGXAgxPZcHOA==",
  "shasum": "7abbbf5b53d99b1f7192a3a675b264ddf8e309f4",
  "tarball": "https://registry.npmjs.org/1clearscientist/-/1clearscientist-1.0.55.tgz",
  "fileCount": 84,
  "unpackedSize": 12173052,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQDpLGj6/0I1/mR49p9VZt32GKnh2LYPhRn7vumSl6mqWAIhAKMYgp3uC+hHQ81tgfx4TRJJcEPoZZt/0LWHyF8K2Zes"
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7ADoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6Qw//XnPJZJrcGKKbedG4o1oYl4FvMzIfZZw2+HWcbPnsODJFbfuq\r\nxpc7/o0kuO+QB32EAMXHYXMDPiEYlbmEuYlF7L63x6i6EvjovK4cv8sSa1r8\r\ne5rYDF1MrBverJ2afsO5SwFhtepR3tUHrmpRc5S4P/moMDBK8O/9+3Bup0b1\r\nlRisAD/TfvgZ0Yll/jmCrWelPpDm4otB/qpvLXOgTFN7uPiHgY2m4rM8qBUr\r\n694M+VrLbZcy4lM8yjRoV652zWMGUHho6bimQiC9YOLGTZoYVs+3VDLJRvEe\r\nxQIxJTN1QYirv4CtbBVi9PeTcpTV9F466pY9zn1WhTdwv90sUdzbGJHfwC84\r\nkOiHb7eSTLxsQdI3Vr5WEL4o2U0evNpY0mviZxRInVcYFDgUBNfwe1ErwTxo\r\nb+x/14vHoDMtfVyczpsiHja8piywiHFTXts98lkmfcyIGvhNEFOL+ySJo9Zn\r\nTbh6k5xadPVeBuZo052rcWva2cMtbita6+2X2snGMwaoTHhVFyHZGzUs8F1L\r\nb1cBkWUJP5yLKNmxvaPsT/BXwO/t8oH/FeuzjlyE01o6G1KvWC3YAc0eP/tx\r\nGtSI7n0Y/yzATI1C83/Sl2XU6xU97+SPS6RdjehKDMI4PiFJriWwrV9/C1m5\r\nzmYi+JAX9sTxKRqtUlIwI1OiUhx1ny8Ou+o=\r\n=LxwL\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
rohitsaini1196/npm-publish-boilerplate

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:0cb6fb13ea3716268af1274cccd39e65df301f86e171415b07b59f7d44df1a5e

Other collected versions

1.0.5618 Feb1.0.544 Dec1.0.531 Dec1.0.5220 Nov1.0.512 Nov1.0.52 NovView all collected versions →