This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# CRC stands for "Create React Component" | |
# To use, just run CRC.sh <project_root_folder> <component_name> | |
# The script will automatically create the component in the following | |
# PATH : <root>/src/components/<component_name>/<component_name>.jsx | |
# with a basic skeleton in it | |
mkdir -p ${1}/src/components/${2} && touch ${1}/src/components/${2}/${2}.jsx | |
cat <<EOT >>./src/components/${2}/${2}.jsx | |
import React from 'react'; |