
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
react-rollup-npm-boilerplat
Advanced tools
This boilerplate allows you to create npm package fast and easy with the following setup:
pnpm install
src/components/index.ts
to export your component.ComponentName.stories.tsx
following the instructions on storybook site.ComponentName.test.tsx
.pnpm storybook
to see your component during development.pnpm commit
to commit your files following conventional commit standards.pnpm semantic-release
pnpm test
pnpm semantic-release
pnpm build-lib
cd lib
npm publish --access public
This build relies on Prettier formatter to enforce code style. And ESLint for identifying problematic patterns found in the code.
Setting up prettier:
1- You can find steps on how to set up prettier formatter with WebStorm/PhpStorm here.
Notes:
node_modules
version of prettier instead of a global one, to avoid version conflicts (in case the globally installed version does not match the version specified in package.json
).2- Follow the next steps to set up prettier and eslint in VS Code:
Install prettier
plugin
Install eslint
plugin
Open VS Code settings CTRL + ,
:
a- Search for formatter
=> check Format on save
b- Search for prettier
=> add .prettierrc
in Prettier: Config Path section && check Prettier: Require Config
3- Please refer to other tutorials if you are using a different IDE.
In the project directory, you can run:
pnpm storybook
pnpm commit
pnpm semantic-release
:package.json
.pnpm build-storybook
pnpm build-lib
dist
folder in 2 formats:
dist/index.d.ts
pnpm test
pnpm test:watch
/src
directory using watch mode.pnpm test:clear
FAQs
An example of creating a react npm package
We found that react-rollup-npm-boilerplat 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 Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.