This repository was archived by the owner on Feb 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +1789
-44
lines changed Expand file tree Collapse file tree 6 files changed +1789
-44
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < title > @cat-react/form - examples</ title >
6
+ </ head >
7
+ < body >
8
+ < h1 > < a href ="https://github.com/cat-react/form "> @cat-react/form</ a > - examples</ h1 >
9
+ < ul >
10
+ < li > < a href ="login/index.html "> Simple Login</ a > </ li >
11
+ </ ul >
12
+ </ body >
13
+ </ html >
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import ReactDOM from 'react-dom' ;
3
+
4
+ class App extends React . Component {
5
+ render ( ) {
6
+ return < div > Login</ div > ;
7
+ } ;
8
+ }
9
+
10
+ ReactDOM . render ( < App /> , document . getElementById ( 'example' ) ) ;
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < title > @cat-react/form - examples - Login</ title >
6
+ </ head >
7
+ < body >
8
+ < h1 > < a href ="https://github.com/cat-react/form "> @cat-react/form</ a > - < a href ="../index.html "> examples</ a > - Login</ h1 >
9
+ < div id ="example "> </ div >
10
+ < script src ="/build/vendor.bundle.js "> </ script >
11
+ < script src ="/build/login.js "> </ script >
12
+ </ body >
13
+ </ html >
Original file line number Diff line number Diff line change
1
+ var fs = require ( 'fs' ) ;
2
+ var path = require ( 'path' ) ;
3
+ var webpack = require ( 'webpack' ) ;
4
+
5
+ module . exports = {
6
+ devtool : 'inline-source-map' ,
7
+ entry : fs . readdirSync ( __dirname ) . reduce ( function ( entries , dir ) {
8
+ const isDir = fs . lstatSync ( path . join ( __dirname , dir ) ) . isDirectory ( ) ;
9
+
10
+ if ( isDir ) {
11
+ entries [ dir ] = path . join ( __dirname , dir , 'app.js' ) ;
12
+ }
13
+
14
+ return entries ;
15
+ } , { } ) ,
16
+ output : {
17
+ path : path . join ( __dirname , 'build' ) ,
18
+ filename : '[name].js' ,
19
+ chunkFilename : '[id].chunk.js' ,
20
+ publicPath : '/build/'
21
+ } ,
22
+ module : {
23
+ loaders : [
24
+ {
25
+ test : / \. j s $ / ,
26
+ exclude : / n o d e _ m o d u l e s / ,
27
+ loader : 'babel-loader' ,
28
+ query : {
29
+ presets : [ 'es2015' , 'react' ]
30
+ }
31
+ }
32
+ ]
33
+ } ,
34
+ resolve : {
35
+ alias : {
36
+ '@cat-react/form' : '../../src'
37
+ }
38
+ } ,
39
+ plugins : [
40
+ new webpack . optimize . CommonsChunkPlugin ( 'vendor.bundle' )
41
+ ]
42
+ } ;
Original file line number Diff line number Diff line change 8
8
"license" : " MIT" ,
9
9
"scripts" : {
10
10
"test" : " ./node_modules/.bin/jest" ,
11
- "lint" : " ./node_modules/.bin/eslint src/**/*"
11
+ "lint" : " ./node_modules/.bin/eslint src/**/*" ,
12
+ "examples" : " ./node_modules/.bin/webpack-dev-server --config examples/webpack.config.js --content-base examples --open --hot"
12
13
},
13
14
"dependencies" : {
14
15
"auto-bind" : " ^1.1.0" ,
17
18
"devDependencies" : {
18
19
"babel-eslint" : " ^7.2.3" ,
19
20
"babel-jest" : " ^20.0.3" ,
21
+ "babel-loader" : " ^7.1.2" ,
20
22
"babel-plugin-transform-class-properties" : " ^6.24.1" ,
21
23
"babel-plugin-transform-decorators-legacy" : " ^1.3.4" ,
22
24
"babel-preset-es2015" : " ^6.24.1" ,
28
30
"jest" : " ^20.0.4" ,
29
31
"react" : " ^15.6.1" ,
30
32
"react-dom" : " ^15.6.1" ,
31
- "react-test-renderer" : " ^15.6.1"
33
+ "react-test-renderer" : " ^15.6.1" ,
34
+ "webpack" : " ^3.5.5" ,
35
+ "webpack-dev-server" : " ^2.7.1"
32
36
},
33
37
"peerDependencies" : {
34
38
"react" : " >= 15.0.0 < 17.0.0"
You can’t perform that action at this time.
0 commit comments