Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add notice to top of generated files #56

Merged
merged 1 commit into from
Sep 10, 2021
Merged

Conversation

dpilch
Copy link
Member

@dpilch dpilch commented Sep 9, 2021

Resolves #55

Add notice to the top of generated files warning users to not make modifications to
the generated files.

A sample generated file will look like this.

/***************************************************************************
 * The contents of this file were generated with Amplify Studio.           *
 * Please refrain from making any modifications to this file.              *
 * Any changes to this file will be overwritten when running amplify pull. *
 **************************************************************************/

/* eslint-disable */
import React from "react";
import {
  CustomButton,
  View,
  findChildOverrides,
  getOverrideProps,
} from "@aws-amplify/ui-react";
export default function BoxWithButton(props) {
  return (
    <View
      padding-left
      {...props}
      {...getOverrideProps(props.overrides, "View")}
    >
      <CustomButton
        color="#ff0000"
        width="20px"
        buttonText="Click Me"
        {...findChildOverrides(props.overrides, "CustomButton")}
      ></CustomButton>
    </View>
  );
}

The /* eslint-disable */ is included in the component text so that line has
been removed.

@dpilch dpilch requested a review from johnpc September 9, 2021 19:50
Copy link

@johnpc johnpc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@frimfram frimfram self-requested a review September 10, 2021 03:24
@dpilch dpilch merged commit 4f492cd into main Sep 10, 2021
@dpilch dpilch deleted the generated-notice branch September 10, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a note to the generated files that asks customers not to edit
3 participants