Skip to content

Commit b47e236

Browse files
author
Carlos Paelinck
authored
Start transition to Emotion. Fix Prism. (#377)
* Start transition to Emotion. Fix Prism. * Removed package lock
1 parent 68a2cf7 commit b47e236

17 files changed

+253
-200
lines changed

.babelrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"react"
66
],
77
"plugins": [
8-
"transform-decorators-legacy"
8+
"transform-decorators-legacy",
9+
"emotion"
910
],
1011
"env": {
1112
"production": {
@@ -15,7 +16,8 @@
1516
"transform-react-constant-elements",
1617
"transform-react-inline-elements",
1718
"transform-runtime",
18-
"transform-decorators-legacy"
19+
"transform-decorators-legacy",
20+
"emotion"
1921
]
2022
},
2123
"test": {

example/src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export default class Presentation extends React.Component {
6969
source={require('raw-loader!../assets/deck.example')}
7070
margin="20px auto"
7171
overflow = "overflow"
72-
height = "80vh"
7372
/>
7473
</Slide>
7574
<Slide>

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<title>Spectacle</title>
77
<link href="https://fonts.googleapis.com/css?family=Lobster+Two:400,700" rel="stylesheet" type="text/css">
88
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700" rel="stylesheet" type="text/css">
9-
<link href="https://unpkg.com/prismjs@1/themes/prism-tomorrow.css" rel="stylesheet" type="text/css">
9+
<link href="https://unpkg.com/prismjs@1.8.1/themes/prism-tomorrow.css" rel="stylesheet" type="text/css">
1010
</head>
1111
<body>
1212
<div id="root"></div>
13-
<script src="https://unpkg.com/prismjs@1/prism.js"></script>
14-
<script src="https://unpkg.com/prismjs@1/components/prism-jsx.min.js"></script>
13+
<script src="https://unpkg.com/prismjs@1.8.1/prism.js"></script>
14+
<script src="https://unpkg.com/prismjs@1.8.1/components/prism-jsx.min.js"></script>
1515
<script src="./dist/bundle.js"></script>
1616
</body>
17-
</html>
17+
</html>

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@
2323
"license": "MIT",
2424
"dependencies": {
2525
"component-playground": "^3.0.0",
26+
"emotion": "^8.0.8",
2627
"history": "^4.6.1",
2728
"lodash": "^4.17.4",
2829
"marksy": "^0.4.2",
2930
"normalize.css": "^7.0.0",
3031
"radium": "^0.19.1",
32+
"react-emotion": "^8.0.8",
3133
"react-redux": "^5.0.5",
3234
"react-transition-group": "^1.1.3",
3335
"react-typography": "^0.16.5",
3436
"redux": "^3.0.4",
3537
"redux-actions": "^2.0.3",
36-
"styled-components": "^1.4.6",
3738
"victory-core": "^15.2.0"
3839
},
3940
"peerDependencies": {
@@ -47,6 +48,7 @@
4748
"babel-eslint": "^7.2.3",
4849
"babel-jest": "^20.0.3",
4950
"babel-loader": "^7.0.0",
51+
"babel-plugin-emotion": "^8.0.6",
5052
"babel-plugin-react-transform": "^2.0.0-beta1",
5153
"babel-plugin-transform-decorators-legacy": "^1.2.0",
5254
"babel-plugin-transform-react-constant-elements": "^6.23.0",
@@ -93,7 +95,12 @@
9395
"moduleNameMapper": {
9496
"\\.(css)$": "<rootDir>/__mocks__/styleMock.js"
9597
},
96-
"snapshotSerializers": ["enzyme-to-json/serializer"],
97-
"setupFiles": ["raf/polyfill", "<rootDir>/jest-setup.js"]
98+
"snapshotSerializers": [
99+
"enzyme-to-json/serializer"
100+
],
101+
"setupFiles": [
102+
"raf/polyfill",
103+
"<rootDir>/jest-setup.js"
104+
]
98105
}
99106
}

src/components/__snapshots__/component-playground.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`<ComponentPlayground /> Should render the dark theme correctly 1`] = `
44
<div
5-
class="theme-dark jELORc"
5+
class="theme-dark css-4o0hkq"
66
>
77
<div
88
class="playground"
@@ -33,7 +33,7 @@ exports[`<ComponentPlayground /> Should render the dark theme correctly 1`] = `
3333

3434
exports[`<ComponentPlayground /> Should render the light theme correctly 1`] = `
3535
<div
36-
class="theme-light jELORc"
36+
class="theme-light css-4o0hkq"
3737
>
3838
<div
3939
class="playground"
@@ -64,7 +64,7 @@ exports[`<ComponentPlayground /> Should render the light theme correctly 1`] = `
6464

6565
exports[`<ComponentPlayground /> Should render with a custom background color 1`] = `
6666
<div
67-
class="theme-light TlFwj"
67+
class="theme-light css-13q1kal"
6868
>
6969
<div
7070
class="playground"
@@ -95,7 +95,7 @@ exports[`<ComponentPlayground /> Should render with a custom background color 1`
9595

9696
exports[`<ComponentPlayground /> Should render with a custom code block 1`] = `
9797
<div
98-
class="theme-light TlFwj"
98+
class="theme-light css-13q1kal"
9999
>
100100
<div
101101
class="playground"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`<Fill /> should render with style \`flex: 1\` 1`] = `
4-
<styled.div>
4+
<Styled(div)>
55
<div
6-
className="fSVTfK"
6+
className="css-1rr4qq7"
77
>
88
Spectacle
99
</div>
10-
</styled.div>
10+
</Styled(div)>
1111
`;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`<Fit /> should render with style \`flex: 0\` 1`] = `
4-
<styled.div>
4+
<Styled(div)>
55
<div
6-
className="fSnuyn"
6+
className="css-72fd9l"
77
>
88
Hello
99
</div>
10-
</styled.div>
10+
</Styled(div)>
1111
`;

src/components/__snapshots__/manager.test.js.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ exports[`<Manager /> should render the export configuration when specified. 1`]
352352
]
353353
}
354354
>
355-
<styled.div>
355+
<Styled(div)>
356356
<div
357-
className="djkYse"
357+
className="css-v2kfba"
358358
>
359359
<MockSlide
360360
export={true}
@@ -381,7 +381,7 @@ exports[`<Manager /> should render the export configuration when specified. 1`]
381381
</div>
382382
</MockSlide>
383383
</div>
384-
</styled.div>
384+
</Styled(div)>
385385
</Export>
386386
<Style
387387
key=".6"
@@ -486,19 +486,19 @@ exports[`<Manager /> should render the overview configuration when specified. 1`
486486
]
487487
}
488488
>
489-
<styled.div>
489+
<Styled(div)>
490490
<div
491-
className="kxQqKR"
491+
className="css-gv2ckq"
492492
>
493-
<styled.div
493+
<Styled(div)
494494
index={0}
495495
key="0"
496496
onClick={[Function]}
497497
screen={0}
498498
slideIndex={0}
499499
>
500500
<div
501-
className="cAopeV"
501+
className="css-13mtebb"
502502
onClick={[Function]}
503503
>
504504
<MockSlide
@@ -515,16 +515,16 @@ exports[`<Manager /> should render the overview configuration when specified. 1`
515515
</div>
516516
</MockSlide>
517517
</div>
518-
</styled.div>
519-
<styled.div
518+
</Styled(div)>
519+
<Styled(div)
520520
index={1}
521521
key="1"
522522
onClick={[Function]}
523523
screen={0}
524524
slideIndex={0}
525525
>
526526
<div
527-
className="gtMIIo"
527+
className="css-13d6elb"
528528
onClick={[Function]}
529529
>
530530
<MockSlide
@@ -541,9 +541,9 @@ exports[`<Manager /> should render the overview configuration when specified. 1`
541541
</div>
542542
</MockSlide>
543543
</div>
544-
</styled.div>
544+
</Styled(div)>
545545
</div>
546-
</styled.div>
546+
</Styled(div)>
547547
</Overview>
548548
<Fullscreen
549549
key=".4"

0 commit comments

Comments
 (0)