Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #How to use: $OUT will be your current directory and the first argument after the filename
- #Example: "./script.sh hello" will output with "hello" being $1
- pwd=`pwd`
- OUT=$pwd/$1.js
- echo "Writing to $OUT:"
- cat <<EOF >$OUT
- import React from 'react';
- import ProptTypes from 'prop-types';
- export default class $1 extends React.Component {
- constructor(props) {
- super(props);
- this.state = {};
- }
- render() {
- return ();
- }
- }
- EOF
- cat $OUT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement