Observed since 20 Oct, 18:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
1clearscientist
A demo for publishing cool packages to npm registry
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
Clone this Repo.
Modify /src
folder or overwrite
index.js according to your package's need.
Install all Dependencies by running:
npm install
npm run build
Login into to your NPM account using terminal/cmd.
Publish it
npm publish
/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.
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
Source distribution
{
"integrity": "sha512-elHOa+fw70M0Cx6EZAvNw8O6HDoeY5pdf1sdSM+F9ckw2RTcO7QDx3XxKUqhDcP0hUjkoiHgJ/NaW3TCRMz3ow==",
"shasum": "f5a6722ce64f589e514fe62df7a20ed25c6e9336",
"tarball": "https://registry.npmjs.org/1clearscientist/-/1clearscientist-1.0.53.tgz",
"fileCount": 561,
"unpackedSize": 125826333,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIH7+NwDpevu0XdicKUyjqB6re03da4cwO01/Ihew25YnAiEAkw8FOBSvDRUQU0wx4UXOG86PwCPr7pWBoELa0lW5aog="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiERKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCOg//aInpdtl42srp44zBGrzsiWaf5Oz/qlZoPQuv8Xgu6WZesZlQ\r\nwbfZFVcQnF7LnlBMU10omvYRnbLZI8ERGya/SZdtrCUaLi9lgExFyJJR5bJl\r\n98HhEd2opFfgfxogWVB4rwAWWnEWCUOvSlXnrbZ6VPfGyF98dWpyY1SkVU9s\r\n582eFmdXXdfzUGHZahcNymROE6hmVmP/HhjxK4OKZAhSW70pTjLP8HObiUTh\r\nt0YYn4vqTc45HVHM/0uI2biGwBrtXM59AkhwEHniYv7fuhz17EJIxNt4+v84\r\nIDBXF0WhdaQYk30UYlbBVeejz8W7umoHEgTlvktfvEsAurlDlgyZ7E0FtLJf\r\nTyK604sboLXl2WyITcL3Ac6v7c06AZGSmd9Q04avk6RqVM50mqZPFczBHtvt\r\nYVUyYau5LQbUxP5y4uC73F/WjtEoAMfq1zSICfAGeD4z3qdXjuLQqvqdDb0A\r\nCLCHgGzRV2bxkzwqHM3vIstlHLcnYjOtsdgTxyyHkSJzub7oeEKQan8Efpgk\r\nIDcVu6Yipn5hxnAuN9c3uirvof/31HyKInBLsOMwLomYj1NNdlQr1O/l4ZGC\r\nVClRlFFwIUTajhiJZ4lHgvJ4qVT2nrRhVNU2SDmoGKx6QuKrM6G4IeiCKS0k\r\natPM4cGcIWbnM0q6pGUjdwTy85O6h51WG9I=\r\n=/BgT\r\n-----END PGP SIGNATURE-----\r\n"
}Shared repository data · GitHub
Observed since 20 Oct, 18:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:600028c2ee25031cd9138aa247efaa82f801210bf9748b5cf6e730debe305a5c