File tree Expand file tree Collapse file tree 8 files changed +5982
-2161
lines changed Expand file tree Collapse file tree 8 files changed +5982
-2161
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 3
3
"version" : " 3.0.0-alpha.6" ,
4
4
"private" : true ,
5
5
"devDependencies" : {
6
- "babel-preset-react-app" : " ^1.0 .0" ,
6
+ "babel-preset-react-app" : " ^2.2 .0" ,
7
7
"raw-loader" : " ^0.5.1" ,
8
- "react-scripts" : " 0.6.1 "
8
+ "react-scripts" : " 0.9.5 "
9
9
},
10
10
"cookbook" : {
11
11
"githubprefix" : " https://github.com/gre/gl-react/tree/master/cookbook/"
12
12
},
13
13
"dependencies" : {
14
- "animated" : " ^0.1.3 " ,
14
+ "animated" : " ^0.2.0 " ,
15
15
"github-slugger" : " ^1.1.1" ,
16
16
"gl-react" : " next" ,
17
17
"gl-react-dom" : " next" ,
33
33
"react-prism" : " ^4.0.0" ,
34
34
"react-router" : " ^2.8.1" ,
35
35
"react-sidebar" : " ^2.2.1" ,
36
- "remark" : " ^6.2 .0" ,
37
- "remark-react" : " ^3.1 .0"
36
+ "remark" : " ^7.0 .0" ,
37
+ "remark-react" : " ^4.0 .0"
38
38
},
39
39
"scripts" : {
40
40
"start" : " react-scripts start" ,
Original file line number Diff line number Diff line change @@ -12,7 +12,13 @@ import remarkReactRenderer from "remark-react";
12
12
import API from "../../API.json" ;
13
13
import "./style.css" ;
14
14
import Code from "../Code" ;
15
- import DocIntroMD from "raw!../../DocIntro.md" ;
15
+ import DocIntroMDBase64 from "../../DocIntro.md" ;
16
+
17
+ const mdheader = "data:text/x-markdown;base64," ;
18
+ const DocIntroMD =
19
+ DocIntroMDBase64 . indexOf ( mdheader ) === 0
20
+ ? atob ( DocIntroMDBase64 . slice ( mdheader . length ) )
21
+ : "" ;
16
22
17
23
const paths = {
18
24
"Component" : "https://facebook.github.io/react/docs/react-component.html" ,
@@ -479,6 +485,12 @@ class DocSection extends PureComponent {
479
485
}
480
486
}
481
487
488
+ class DocIntro extends Component {
489
+ render ( ) {
490
+ return MD . processSync ( DocIntroMD ) . contents ;
491
+ }
492
+ }
493
+
482
494
class DocBody extends Component {
483
495
render ( ) {
484
496
return (
@@ -495,13 +507,6 @@ class DocBody extends Component {
495
507
}
496
508
}
497
509
498
-
499
- class DocIntro extends Component {
500
- render ( ) {
501
- return MD . process ( DocIntroMD ) . contents ;
502
- }
503
- }
504
-
505
510
class Doc extends PureComponent {
506
511
render ( ) {
507
512
return (
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+ cd ` dirname $0 `
2
3
while read ex
3
4
do
4
5
if [ ! -z $ex ] && [ -d $ex ]
5
6
then
6
- echo " import ${ex} _E from './$ex ';" ;
7
- echo " import * as ${ex} _m from './$ex /meta';" ;
8
- echo " import ${ex} _s from '!raw!./$ex /index.js';" ;
7
+ echo " import ${ex} _E from \" ./$ex \" ;" ;
8
+ echo " import * as ${ex} _m from \" ./$ex /meta\" ;" ;
9
+ echo " const ${ex} _s = \` " ;
10
+ cat ./$ex /index.js | sed ' s/\\/\\\\/g' | sed ' s/\`/\\\`/g' ;
11
+ echo " \` ;" ;
9
12
echo " export const $ex ={ Example: ${ex} _E, source: ${ex} _s, ...${ex} _m };"
10
13
else
11
14
echo " $ex not found" 1>&2 ;
You can’t perform that action at this time.
0 commit comments