-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from Igorbek/bugfix/issue36
Fix minification issues #36
- Loading branch information
Showing
11 changed files
with
274 additions
and
7 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
src/__tests__/baselines/minification-only/issue36-extended.ts.baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`issue36-extended.ts 1`] = ` | ||
|
||
File: issue36-extended.ts | ||
Source code: | ||
|
||
declare const styled: any; | ||
|
||
export const A = styled.div\` | ||
border: \${'solid'} 10px; | ||
\` | ||
|
||
styled.div\` | ||
border: \${'solid'}// comment here | ||
10px; | ||
border: solid// comment here | ||
10px; | ||
\` | ||
|
||
styled.div\` | ||
border: \${'solid'}/* comment here | ||
*/10px; | ||
border: \${'solid'}/* comment here | ||
*/ 10px; | ||
\` | ||
|
||
|
||
TypeScript before transform: | ||
|
||
declare const styled: any; | ||
export const A = styled.div \`\\n border: \${"solid"} 10px;\\n\`; | ||
styled.div \`\\n border: \${"solid"}// comment here\\n10px;\\n border: solid// comment here\\n10px;\\n\`; | ||
styled.div \`\\n border: \${"solid"}/* comment here\\n*/10px;\\n border: \${"solid"}/* comment here\\n*/ 10px;\\n\`; | ||
|
||
|
||
TypeScript after transform: | ||
|
||
declare const styled: any; | ||
export const A = styled.div \`border:\${'solid'} 10px;\`; | ||
styled.div \`border:\${'solid'} 10px;border:solid 10px;\`; | ||
styled.div \`border:\${'solid'} 10px;border:\${'solid'} 10px;\`; | ||
|
||
|
||
|
||
`; |
45 changes: 45 additions & 0 deletions
45
src/__tests__/baselines/minification-only/issue36.tsx.baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`issue36.tsx 1`] = ` | ||
|
||
File: issue36.tsx | ||
Source code: | ||
|
||
declare const keyframes: any; | ||
declare const styled: any; | ||
|
||
const rotate360 = keyframes\` | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
\`; | ||
|
||
export const StyledDiv = styled.div\` | ||
width: 100px; | ||
height: 100px; | ||
background-color: greenyellow; | ||
animation: \${rotate360} 2s linear infinite; | ||
\`; | ||
|
||
|
||
TypeScript before transform: | ||
|
||
declare const keyframes: any; | ||
declare const styled: any; | ||
const rotate360 = keyframes \`\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n\`; | ||
export const StyledDiv = styled.div \`\\n width: 100px;\\n height: 100px;\\n background-color: greenyellow;\\n animation: \${rotate360} 2s linear infinite;\\n\`; | ||
|
||
|
||
TypeScript after transform: | ||
|
||
declare const keyframes: any; | ||
declare const styled: any; | ||
const rotate360 = keyframes \`from{transform:rotate(0deg);}to{transform:rotate(360deg);}\`; | ||
export const StyledDiv = styled.div \`width:100px;height:100px;background-color:greenyellow;animation:\${rotate360} 2s linear infinite;\`; | ||
|
||
|
||
|
||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/__tests__/baselines/minification/issue36-extended.ts.baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`issue36-extended.ts 1`] = ` | ||
|
||
File: issue36-extended.ts | ||
Source code: | ||
|
||
declare const styled: any; | ||
|
||
export const A = styled.div\` | ||
border: \${'solid'} 10px; | ||
\` | ||
|
||
styled.div\` | ||
border: \${'solid'}// comment here | ||
10px; | ||
border: solid// comment here | ||
10px; | ||
\` | ||
|
||
styled.div\` | ||
border: \${'solid'}/* comment here | ||
*/10px; | ||
border: \${'solid'}/* comment here | ||
*/ 10px; | ||
\` | ||
|
||
|
||
TypeScript before transform: | ||
|
||
declare const styled: any; | ||
export const A = styled.div \`\\n border: \${"solid"} 10px;\\n\`; | ||
styled.div \`\\n border: \${"solid"}// comment here\\n10px;\\n border: solid// comment here\\n10px;\\n\`; | ||
styled.div \`\\n border: \${"solid"}/* comment here\\n*/10px;\\n border: \${"solid"}/* comment here\\n*/ 10px;\\n\`; | ||
|
||
|
||
TypeScript after transform: | ||
|
||
declare const styled: any; | ||
export const A = styled.div.withConfig({ displayName: "A" }) \`border:\${'solid'} 10px;\`; | ||
styled.div \`border:\${'solid'} 10px;border:solid 10px;\`; | ||
styled.div \`border:\${'solid'} 10px;border:\${'solid'} 10px;\`; | ||
|
||
|
||
|
||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`issue36.tsx 1`] = ` | ||
|
||
File: issue36.tsx | ||
Source code: | ||
|
||
declare const keyframes: any; | ||
declare const styled: any; | ||
|
||
const rotate360 = keyframes\` | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
\`; | ||
|
||
export const StyledDiv = styled.div\` | ||
width: 100px; | ||
height: 100px; | ||
background-color: greenyellow; | ||
animation: \${rotate360} 2s linear infinite; | ||
\`; | ||
|
||
|
||
TypeScript before transform: | ||
|
||
declare const keyframes: any; | ||
declare const styled: any; | ||
const rotate360 = keyframes \`\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n\`; | ||
export const StyledDiv = styled.div \`\\n width: 100px;\\n height: 100px;\\n background-color: greenyellow;\\n animation: \${rotate360} 2s linear infinite;\\n\`; | ||
|
||
|
||
TypeScript after transform: | ||
|
||
declare const keyframes: any; | ||
declare const styled: any; | ||
const rotate360 = keyframes \`from{transform:rotate(0deg);}to{transform:rotate(360deg);}\`; | ||
export const StyledDiv = styled.div.withConfig({ displayName: "StyledDiv" }) \`width:100px;height:100px;background-color:greenyellow;animation:\${rotate360} 2s linear infinite;\`; | ||
|
||
|
||
|
||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
declare const styled: any; | ||
|
||
export const A = styled.div` | ||
border: ${'solid'} 10px; | ||
` | ||
|
||
styled.div` | ||
border: ${'solid'}// comment here | ||
10px; | ||
border: solid// comment here | ||
10px; | ||
` | ||
|
||
styled.div` | ||
border: ${'solid'}/* comment here | ||
*/10px; | ||
border: ${'solid'}/* comment here | ||
*/ 10px; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
declare const keyframes: any; | ||
declare const styled: any; | ||
|
||
const rotate360 = keyframes` | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
`; | ||
|
||
export const StyledDiv = styled.div` | ||
width: 100px; | ||
height: 100px; | ||
background-color: greenyellow; | ||
animation: ${rotate360} 2s linear infinite; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters