Last active
February 8, 2018 06:26
-
-
Save nishantrpai/bdec3f6e1192137bc848eccf979c9002 to your computer and use it in GitHub Desktop.
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
component=$1 | |
echo "export {$component} from './$component';" >> index.js | |
echo "@import './$component/style.css';" >> index.css | |
mkdir $component | |
cd $component | |
touch index.js | |
touch style.css | |
touch $component.js | |
echo "export { default as $component } from './$component';" >> index.js | |
COMPONENTFILE="import React from \"react\"; | |
\nimport PropTypes from \"prop-types\"; | |
\nimport { connect } from \"react-redux\"; | |
\nconst $component = () => ( | |
\n <p> Hello World!</p> | |
\n); | |
\n\nexport default $component; | |
" | |
echo $COMPONENTFILE >> $component.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment