Last active
December 2, 2015 18:50
-
-
Save carl0zen/b1711c6efa2c0cefe02f 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/sh | |
# author: perezpriego | |
# This shell script creates the basic architecture of a react-component | |
mkdir -p $1 | |
cd $1 | |
touch styles.scss index.jsx | |
cat > index.jsx <<DELIM | |
import React from "react"; | |
import styles from "./style"; | |
class $1 extends React.Component { | |
render() { | |
return ( | |
<div className={styles.root}> | |
$1 | |
</div> | |
); | |
} | |
} | |
$1.displayName = $1.name; | |
export default $1; | |
DELIM | |
cat > styles.scss <<DELIM | |
@import "../../paint-settings.scss"; | |
:local(.root) { | |
border: 1px solid red; //for testing purposes | |
} | |
DELIM | |
"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment