File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ always be in sync.
3737- ` scripts/test ` will fire up a karma runner and watch for changes in the
3838 specs directory.
3939- ` 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
4141 for changes and build the examples.
4242
4343### Build
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ React Router Examples
44To run and development examples:
55
661 . 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 1313 "example" : " examples"
1414 },
1515 "scripts" : {
16+ "examples" : " webpack-dev-server --inline --no-info --content-base examples" ,
1617 "test" : " scripts/test --browsers Firefox --single-run" ,
1718 "lint" : " jsxhint examples modules"
19+
1820 },
1921 "authors" : [
2022 " 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) {
88 return fs . lstatSync ( dir ) . isDirectory ( ) ;
99}
1010
11- function buildEntries ( ) {
12- return fs . readdirSync ( EXAMPLES_DIR ) . reduce ( function ( entries , dir ) {
13- if ( dir === 'build' )
14- return entries ;
11+ module . exports = {
1512
13+ entry : fs . readdirSync ( EXAMPLES_DIR ) . reduce ( function ( entries , dir ) {
1614 var isDraft = dir . charAt ( 0 ) === '_' ;
1715
1816 if ( ! isDraft && isDirectory ( path . join ( EXAMPLES_DIR , dir ) ) )
1917 entries [ dir ] = path . join ( EXAMPLES_DIR , dir , 'app.js' ) ;
2018
2119 return entries ;
22- } , { } ) ;
23- }
24-
25- module . exports = {
26-
27- entry : buildEntries ( ) ,
20+ } , { } ) ,
2821
2922 output : {
3023 filename : '[name].js' ,
3124 chunkFilename : '[id].chunk.js' ,
32- path : 'examples/__build__' ,
33- publicPath : '/__build__/'
25+ publicPath : '__build__'
3426 } ,
3527
3628 module : {
You can’t perform that action at this time.
0 commit comments