
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
create-component-lib
Advanced tools
Create a library of React components that can be published to npm
Create a library of React components that can be published to npm.
Notes:
create-react-app
under the hood.To create a new project, run the command:
npx create-component-lib my-project
This sets up the project inside my-project
.
Place everything you want to publish to npm inside src/lib
. Outside src/lib
(but inside src/
), you can create example web pages to test or demonstrate the usage of your components.
To start the development server (with entry point src/index.js
), run
npm start
To transpile src/lib
and create a build in the dist
folder, run:
npm run build
You can then publish it to npm using:
npm publish
Note that only README.md
and the dist
folders are published to npm.
To learn more, see this blog post or this sample libary.
FAQs
Create a library of React components that can be published to npm
The npm package create-component-lib receives a total of 4 weekly downloads. As such, create-component-lib popularity was classified as not popular.
We found that create-component-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.