Skip to content

Commit

Permalink
create @babel-ignore-comment-in-output tag to ignore the comments in …
Browse files Browse the repository at this point in the history
…output JS files
  • Loading branch information
ZeeshanTamboli committed Apr 24, 2023
1 parent 883fce9 commit 7e22d97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/data/material/customization/palette/CustomColor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ declare module '@mui/material/styles' {
}
}

// Update the Button's color prop options
// @babel-ignore-comment-in-output Update the Button's color prop options
declare module '@mui/material/Button' {
interface ButtonPropsColorOverrides {
neutral: true;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/styles/basics/AdaptingHOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const styles = {
interface MyButtonRawProps {
color: 'red' | 'blue';
}
// These are the props available inside MyButtonRaw
// They're different from MyButtonRawProps which are the props available for dynamic styling.
// @babel-ignore-comment-in-output These are the props available inside MyButtonRaw
// @babel-ignore-comment-in-output They're different from MyButtonRawProps which are the props available for dynamic styling.
type MyButtonRawInnerProps = MyButtonRawProps & WithStyles<typeof styles>;

function MyButtonRaw(
Expand Down
1 change: 1 addition & 0 deletions docs/scripts/formattedTSDemos.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const babelConfig = {
generatorOpts: { retainLines: true },
babelrc: false,
configFile: false,
shouldPrintComment: (comment) => !comment.startsWith(' @babel-ignore-comment-in-output'),
};

const workspaceRoot = path.join(__dirname, '../../');
Expand Down

0 comments on commit 7e22d97

Please sign in to comment.