Created
June 13, 2019 21:14
-
-
Save david-mart/3a3034509095856ad6eb88103ed0aa4d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
rm -rf $PWD/$1 | |
mkdir $PWD/$1 | |
var1=$1 | |
name=`echo -n "${var1}" | sed -e 's/-/ /g' -e 's/\b\(.\)/\u\1/g' -e 's/ //g' ` | |
echo "import React from 'react'; | |
import './"$1".scss'; | |
import propTypes from 'prop-types'; | |
const "${name}" = () => { | |
return ( | |
<div styleName='"$1"'> | |
</div> | |
); | |
}; | |
export default "${name}";" >> $PWD/$1/index.js | |
echo "."$1" { | |
}" >> $PWD/$1/$1.scss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment