File tree Expand file tree Collapse file tree 5 files changed +10
-19
lines changed Expand file tree Collapse file tree 5 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ always be in sync.
37
37
- ` scripts/test ` will fire up a karma runner and watch for changes in the
38
38
specs directory.
39
39
- ` npm test ` will do the same but doesn't watch, just runs the tests.
40
- - ` scripts/dev- examples` fires up a webpack dev server that will watch
40
+ - ` npm run examples` fires up a webpack dev server that will watch
41
41
for changes and build the examples.
42
42
43
43
### Build
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ React Router Examples
4
4
To run and development examples:
5
5
6
6
1 . Clone this repo
7
- 1 . Run ` npm install `
8
- 1 . Run ` scripts/dev-examples ` from the repo's root directory
9
- 1 . Point your browser to http://localhost:8080
10
-
7
+ 2 . Run ` npm install `
8
+ 3 . Start the development server with ` npm run examples `
9
+ 4 . Point your browser to http://localhost:8080
Original file line number Diff line number Diff line change 13
13
"example" : " examples"
14
14
},
15
15
"scripts" : {
16
+ "examples" : " webpack-dev-server --inline --no-info --content-base examples" ,
16
17
"test" : " scripts/test --browsers Firefox --single-run" ,
17
18
"lint" : " jsxhint examples modules"
19
+
18
20
},
19
21
"authors" : [
20
22
" Ryan Florence" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,29 +8,21 @@ function isDirectory(dir) {
8
8
return fs . lstatSync ( dir ) . isDirectory ( ) ;
9
9
}
10
10
11
- function buildEntries ( ) {
12
- return fs . readdirSync ( EXAMPLES_DIR ) . reduce ( function ( entries , dir ) {
13
- if ( dir === 'build' )
14
- return entries ;
11
+ module . exports = {
15
12
13
+ entry : fs . readdirSync ( EXAMPLES_DIR ) . reduce ( function ( entries , dir ) {
16
14
var isDraft = dir . charAt ( 0 ) === '_' ;
17
15
18
16
if ( ! isDraft && isDirectory ( path . join ( EXAMPLES_DIR , dir ) ) )
19
17
entries [ dir ] = path . join ( EXAMPLES_DIR , dir , 'app.js' ) ;
20
18
21
19
return entries ;
22
- } , { } ) ;
23
- }
24
-
25
- module . exports = {
26
-
27
- entry : buildEntries ( ) ,
20
+ } , { } ) ,
28
21
29
22
output : {
30
23
filename : '[name].js' ,
31
24
chunkFilename : '[id].chunk.js' ,
32
- path : 'examples/__build__' ,
33
- publicPath : '/__build__/'
25
+ publicPath : '__build__'
34
26
} ,
35
27
36
28
module : {
You can’t perform that action at this time.
0 commit comments