
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
bootstrap-component
Advanced tools
I tend to write my React components like this:
src/
components/
component-name/
index.js
ComponentName.js
The index.js
file simply works as a proxy for the component, so that you can
import it like this:
import ComponentName from './components/component-name';
If you do the same, then you'll love this script!
You can (and should) install this tool globally:
npm install -g bootstrap-component
yarn global add bootstrap-component
You can also use npx
without installing it first - if you'd like to
"try before you buy":
npx bootstrap-component
Run this script from your project's root folder like this:
$ comp
You can specify the name of your component like this:
$ comp my-component
This script is interactive, but can also be used in a scriptable way - via command line arguments.
--path
This is the path to your components folder, relative to the current folder.
Default is --path=src/components
.
--type
One of functionComponent
, classComponent
or empty
Default is empty
.
You can also use the shorthand function
or func
for function components, and
class
for class components.
Please create an issue - or if you're up for it, a pull request.
1.2.0
Add component templates. An interactive question, as well as a new argument --type
.
FAQs
I tend to write my React components like this:
The npm package bootstrap-component receives a total of 0 weekly downloads. As such, bootstrap-component popularity was classified as not popular.
We found that bootstrap-component 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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.