This is a bone-dry simple CLI tool to generate component folders for styled-components
in the React ecosystem. They follow an 'export index' pattern so can be imported normally, using the import Componend from '../components/Component
import pattern.
Clone this directory and then, from within that directory, yarn install -g
or npm install -g
.
Once installed, the script provides the newComponent
command to your CLI. This can be renamed for your own covenience at line 17 of the package.json
Thanks to Atlassian for a great tutorial on scripting Node.