File tree 9 files changed +4057
-16
lines changed
examples/react-styleguidist-example 9 files changed +4057
-16
lines changed Original file line number Diff line number Diff line change @@ -47,4 +47,5 @@ jspm_packages
47
47
.idea
48
48
49
49
# App
50
- lib
50
+ lib
51
+ temp
Original file line number Diff line number Diff line change
1
+ This is our column custom document with example:
2
+
3
+ <Column prop2={0} prop3={null} prop4="option1" />
Original file line number Diff line number Diff line change
1
+ // this is fake app index file
2
+ // just to make sure the webpack itself is setup correctly
3
+
4
+ import { Column } from "./components/Column" ;
5
+ import { ConstExportRow } from "./components/ConstExport" ;
6
+ import { Grid } from "./components/Grid" ;
7
+ import { HocComponent } from "./components/HocComponent" ;
8
+ import { PureRow } from "./components/PureRow" ;
9
+ import { Row } from "./components/Row" ;
10
+
11
+ export {
12
+ Column ,
13
+ ConstExportRow ,
14
+ Grid ,
15
+ HocComponent ,
16
+ PureRow ,
17
+ Row ,
18
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " react-docgen-typescript-example" ,
3
+ "version" : " 0.0.1" ,
4
+ "description" : " " ,
5
+ "main" : " lib/index.js" ,
6
+ "scripts" : {
7
+ "tsc" : " tsc" ,
8
+ "styleguidist" : " styleguidist" ,
9
+ "start" : " tsc && styleguidist server --config styleguide.config.js" ,
10
+ "webpack" : " webpack"
11
+ },
12
+ "author" : " pvasek" ,
13
+ "license" : " MIT" ,
14
+ "dependencies" : {
15
+ "@types/react" : " ^15.0.25" ,
16
+ "@types/react-dom" : " ^15.5.0" ,
17
+ "react" : " ^15.5.4" ,
18
+ "react-dom" : " ^15.5.4"
19
+ },
20
+ "devDependencies" : {
21
+ "react-docgen-typescript" : " ^0.0.11" ,
22
+ "react-styleguidist" : " ^5.2.1" ,
23
+ "ts-loader" : " ^2.1.0" ,
24
+ "typescript" : " ^2.3.3" ,
25
+ "webpack" : " ^2.6.1"
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -11,19 +11,6 @@ module.exports = {
11
11
} ,
12
12
resolver : require ( 'react-docgen' ) . resolver . findAllComponentDefinitions ,
13
13
14
- propsParser : require ( '../../lib/propTypesParser' ) . parse ,
15
-
16
- updateWebpackConfig : function ( webpackConfig , env ) {
17
- webpackConfig . resolve . extensions . push ( '.ts' ) ;
18
- webpackConfig . resolve . extensions . push ( '.tsx' ) ;
19
-
20
- webpackConfig . module . loaders . push (
21
- {
22
- test : / \. t s x ? $ / ,
23
- include : __dirname ,
24
- loader : 'awesome-typescript-loader'
25
- }
26
- ) ;
27
- return webpackConfig ;
28
- }
14
+ //propsParser: require('../../lib/propTypesParser').parse,
15
+ propsParser : require ( 'react-docgen-typescript' ) . parse ,
29
16
} ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "module" : " commonjs" ,
4
+ "target" : " es5" ,
5
+ "noImplicitAny" : false ,
6
+ "sourceMap" : true ,
7
+ "outDir" : " lib" ,
8
+ "jsx" : " react"
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ var path = require ( 'path' ) ;
2
+
3
+ module . exports = {
4
+ entry : {
5
+ bundle : [ './index.ts' ] ,
6
+ } ,
7
+ context : path . resolve ( __dirname ) ,
8
+ output : {
9
+ filename : 'bundle.js' ,
10
+ path : path . join ( __dirname , 'temp' )
11
+ } ,
12
+ module : {
13
+ rules : [
14
+ {
15
+ test : / \. t s x ? $ / ,
16
+ loader : 'ts-loader' ,
17
+ exclude : / n o d e _ m o d u l e s / ,
18
+ }
19
+ ]
20
+ } ,
21
+ resolve : {
22
+ extensions : [ ".tsx" , ".ts" , ".js" ]
23
+ }
24
+ } ;
You can’t perform that action at this time.
0 commit comments