File tree Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 11{
22 "presets" : [
3- [
4- " es2015" ,
5- {
6- "modules" : false
7- }
8- ],
9- " react" ,
10- " stage-0"
11- ],
12- "env" : {
13- "start" : {
14- "presets" : [" react-hmre" ]
15- },
16- "test" : {
17- "presets" : [" es2015" , " react" , " stage-0" ]
18- }
19- }
3+ " env" ,
4+ " react"
5+ ]
206}
Original file line number Diff line number Diff line change 55 "main" : " index.js" ,
66 "scripts" : {
77 "prepublish" : " babel ./src --out-dir ./lib --plugins=transform-class-properties,transform-react-jsx --presets=env" ,
8- "test" : " jest"
8+ "test" : " BABEL_ENV=test jest"
99 },
1010 "repository" : {
1111 "type" : " git" ,
3232 "babel-cli" : " ^6.26.0" ,
3333 "babel-core" : " ^6.26.0" ,
3434 "babel-eslint" : " ^6.1.2" ,
35- "babel-jest" : " ^22.4.1 " ,
35+ "babel-jest" : " ^22.4.3 " ,
3636 "babel-loader" : " ^7.1.2" ,
3737 "babel-plugin-transform-class-properties" : " ^6.24.1" ,
3838 "babel-plugin-transform-react-jsx" : " ^6.24.1" ,
5252 "react" : " ^15.5.4" ,
5353 "react-dom" : " ^15.5.4" ,
5454 "react-test-renderer" : " ^16.2.0" ,
55+ "regenerator-runtime" : " ^0.11.1" ,
5556 "webpack" : " ^3.6.0" ,
5657 "webpack-dev-server" : " ^2.9.1"
5758 },
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ import hljs from 'highlight.js';
22import React from 'react' ;
33
44class Highlight extends React . Component {
5+ constructor ( props ) {
6+ super ( props )
7+ this . setEl = this . setEl . bind ( this )
8+ }
59 componentDidMount ( ) {
610 this . highlightCode ( ) ;
711 }
@@ -18,7 +22,7 @@ class Highlight extends React.Component {
1822 }
1923 }
2024
21- setEl = ( el ) => {
25+ setEl ( el ) {
2226 this . el = el ;
2327 } ;
2428
You can’t perform that action at this time.
0 commit comments