Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #/bin/sh
  2. # author: perezpriego
  3. # This shell script creates the basic architecture of a react-component
  4. mkdir -p $1
  5. cd $1
  6. touch style.scss index.jsx
  7.  
  8. cat > index.jsx <<DELIM
  9. import React from "react";
  10. import styles from "./style";
  11.  
  12. class $1 extends React.Component {
  13. render() {
  14. return (
  15. <div className={styles.root}>
  16. $1
  17. </div>
  18. );
  19. }
  20. }
  21.  
  22. $1.displayName = $1.name;
  23.  
  24. export default $1;
  25. DELIM
  26.  
  27. cat > style.scss <<DELIM
  28. @import "../../paint-settings.scss"; //to use alphasights paint utilities
  29. :local(.root) {
  30. // Your styles here
  31. }
  32. DELIM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement