Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
twg-react-tools
Advanced tools
This is a set of tools to help React Developers work more quickly by giving them access to TRT (TWG-React-Tools).
TRT helps you perform better, faster - by allowing you to quickly perform tasks that are common to most TWG reacters
The tools in this set adhere to TWG's react guidelines
This suite of tools is comprised of a library of components and commands - including, but not limited to:
NEW!
You can easily add TRT to your globals by adding
yarn global add twg-react-tools
or
npm install -g twg-react-tools
This will take a couple moments while it installs the dependencies for storybook
Starting storybook to get a local view of storybook is easy thanks to trt!
trt storybook
or trt sb
This starts Storybook on http://localhost:6006
This command will generate a new react component using TWG's style guide - complete with a .js, .css, and testing file inside of a folder in the location that you run this command.
The root command for this is: trt generate
(also available with trt g
)
There are currently three different options for generating:
If you're unsure about the difference between stateless and class components, here is an excellent resource.
This process is a guided wizard scenario, this wizard will guide you through the process of generating your component in a multi-step process
This command will include a component from the library (you can see the list of available components in the storybook)
The root command for this is: trt include
There are 2 arguments for this command:
trt include Tooltip
or trt include Tooltip ./components
Oh. So you like autocompletion? You don't want to have to memorize the millions of different components that the library has to offer? We've got you covered! Autocomplete is now part of the CLI (though, it's going to take a little work on your part, if you're willing. It'll make your life nice, I promise.)
Is it a little buggy? Yeah. I ain't know why, I'm sorry.
All these instructions assume you're on a Mac:
trt completion
echo $SHELL | xargs basename > $(brew --prefix)/etc/bash_completion.d/trt
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
This command will create a new react app using TWG's style guide. This is an app that's been initialized with create react app (so you still get to use all those great utility scripts and configs), and has been updated to include a better folder structure for building apps on top of.
This app will also include redux, as well as suggested ways to structure your stores
The root command for this is: trt create
(also available with trt c
)
This process is a guided wizard scenario, this wizard will guide you through the process of generating your app in a multi-step process
Install yarn
(if necessary)
$ brew install yarn
Checkout the repo and install dependencies
$ git clone https://github.com/twg/react-component-library
$ cd react-component-library
$ yarn
$ yarn run storybook
Then visit http://localhost:6006 in your browser.
(this can take a moment...)
$ yarn build-storybook
If you have a component and some stories that you think should be included, there are a couple of ways to get it into TWG's storybook.
FAQs
Take a component, leave a component
The npm package twg-react-tools receives a total of 0 weekly downloads. As such, twg-react-tools popularity was classified as not popular.
We found that twg-react-tools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.