Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/bin/bash
  2. #How to use: $OUT will be your current directory and the first argument after the filename
  3. #Example: "./script.sh hello" will output with "hello" being $1
  4.  
  5. pwd=`pwd`
  6. OUT=$pwd/$1.js
  7.  
  8. echo "Writing to $OUT:"
  9.  
  10. cat <<EOF >$OUT
  11. import React from 'react';
  12. import ProptTypes from 'prop-types';
  13.  
  14. export default class $1 extends React.Component {
  15. constructor(props) {
  16. super(props);
  17. this.state = {};
  18. }
  19.  
  20. render() {
  21. return ();
  22. }
  23. }
  24. EOF
  25.  
  26. cat $OUT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement