{"id":29195704,"url":"https://github.com/md-command-line/ship-my-component-npm","last_synced_at":"2026-05-16T15:34:47.490Z","repository":{"id":57358499,"uuid":"189882531","full_name":"md-command-line/ship-my-component-npm","owner":"md-command-line","description":"adds webpack and some folder conventions to let you publish components to npm publically.","archived":false,"fork":false,"pushed_at":"2019-06-19T17:36:46.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-07T16:41:44.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://medium.com/@BrodaNoel/how-to-create-a-react-component-and-publish-it-in-npm-668ad7d363ce","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/md-command-line.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-02T18:45:01.000Z","updated_at":"2020-05-19T04:13:17.000Z","dependencies_parsed_at":"2022-09-06T21:41:28.214Z","dependency_job_id":null,"html_url":"https://github.com/md-command-line/ship-my-component-npm","commit_stats":null,"previous_names":["michaeldimmitt/ship-my-component-npm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/md-command-line/ship-my-component-npm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-command-line%2Fship-my-component-npm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-command-line%2Fship-my-component-npm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-command-line%2Fship-my-component-npm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-command-line%2Fship-my-component-npm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/md-command-line","download_url":"https://codeload.github.com/md-command-line/ship-my-component-npm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-command-line%2Fship-my-component-npm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33108191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-02T05:05:35.031Z","updated_at":"2026-05-16T15:34:47.474Z","avatar_url":"https://github.com/md-command-line.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ship-my-component-npm\nReact follows a convention where the index.js file is responsible for exporting contents of a folder. \n\u003cbr/\u003eThis project will publish your component if run from a folder with an index.js file that exports the component. \n\n1) Adds webpack and some folder conventions to let you publish components to npm publically. \n\n2) Has a cleanup command to remove what was added.\n\n3) Great for open sourcing a single component folder of your react application\n\u003cbr/\u003esuch as releasing a login screen for people to utilize and modify.\n\n4) Easy for a developer to upgrade the version number when republishing their component.\n\n## Verified working on Ubuntu-Linux ✅ Macintosh Mojave ✅\n\n```bash\nnpx ship-my-component-npm\n\n## cleanup\nnpx ship-my-component-npm cleanup\n```\n\n## Linux Users\n```\n# ensure expect is installed\nsudo apt-get install expect;\n\n# expect is a unix program that comes by default on a mac. It allows your program to interact with another applications prompt. This project uses expect to interact with npm init. Decreasing the amount of prompts from 8 prompts to 3 prompts.\n```\n\n## Try out a previously published react component:\nrun this command in the terminal\n```bash\nnpm install react-publish-ship\n```\n\ninclude the nodemodule in your react project\n```javascript \nimport ReactPublishShip from 'react-publish-ship';\n...\nrender(){\n  \u003cdiv\u003e\n    \u003cReactPublishShip /\u003e\n  \u003c/div\u003e\n}\n...\n```\n\nThis project was made possible thanks to the following blog post:\n\u003cbr/\u003ehttps://medium.com/@BrodaNoel/how-to-create-a-react-component-and-publish-it-in-npm-668ad7d363ce\n\nIn the article a src directory is used. This project has changed the webpack config so as to use the current directory not a src directory.\n\n## Contribute \nPer request, additional modifications could be added to make these scoped packages so that they stay within a company.\n\nLet me know if you find this useful, on twitter m_dimmitt\n\nOpen an [issue](https://github.com/MichaelDimmitt/ship-my-component-npm/issues/new) for a feature request or to report an issue.\n\n## Thanks!!\n\nCurrent Contributors: [Vladamir Pliuta](https://github.com/VolodymyrPliuta) [Michael Dimmitt](https://github.com/michaeldimmitt)\n\n## Known projects published using ship my component: (feel free to submit a pr if you published a react component!)\n[react-publish-ship](https://www.npmjs.com/package/react-publish-ship) [source](https://github.com/nodejs7/React-component-to-npm.git)\n\u003cbr/\u003e[hello-world-npm-component](https://www.npmjs.com/package/hello-world-npm-component) [source](https://github.com/MichaelDimmitt/hello-world-npm-component)\n\nBelow is a project with a ton of components, using the script for this project I could easily share a front end component with the outside world.\n![Screen Shot 2019-06-03 at 1 48 49 PM](https://user-images.githubusercontent.com/11463275/58822844-67264d80-8606-11e9-88d4-5e695b45d246.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-command-line%2Fship-my-component-npm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmd-command-line%2Fship-my-component-npm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-command-line%2Fship-my-component-npm/lists"}