This repository was archived by the owner on Oct 26, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-14
lines changed Expand file tree Collapse file tree 3 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 1- var path = require ( 'path' ) ;
2- var webpack = require ( 'webpack' ) ;
1+ 'use strict'
2+
3+ const path = require ( 'path' )
34
45module . exports = function ( config ) {
56
6- var runCoverage = process . env . COVERAGE === 'true' ;
7+ let runCoverage = process . env . COVERAGE === 'true'
78
8- var coverageLoaders = [ ] ;
9- var coverageReporters = [ ] ;
9+ let coverageLoaders = [ ]
10+ let coverageReporters = [ ]
1011
1112 if ( runCoverage ) {
1213 coverageLoaders . push ( {
@@ -15,7 +16,7 @@ module.exports = function (config) {
1516 loader : 'isparta'
1617 } ) ,
1718
18- coverageReporters . push ( 'coverage' ) ;
19+ coverageReporters . push ( 'coverage' )
1920 }
2021
2122 config . set ( {
@@ -39,12 +40,14 @@ module.exports = function (config) {
3940 module : {
4041 preLoaders : [
4142 {
43+ loader : 'babel' ,
4244 test : / \. j s $ / ,
43- exclude : [
44- path . resolve ( 'node_modules/' )
45- ] ,
46- loader : 'babel'
47- } ,
45+ include : [
46+ path . resolve ( 'src/' ) ,
47+ path . resolve ( 'test/' )
48+ ]
49+
50+ }
4851 ] . concat ( coverageLoaders )
4952 }
5053 } ,
@@ -59,5 +62,5 @@ module.exports = function (config) {
5962 { type : 'json' , subdir : 'browser-coverage' , file : 'coverage.json' }
6063 ]
6164 }
62- } ) ;
63- } ;
65+ } )
66+ }
Original file line number Diff line number Diff line change 1919 "build" : " mkdir -p lib && babel ./src -d lib" ,
2020 "lint" : " eslint examples src test" ,
2121 "test" : " npm run lint && npm run test:node && npm run test:browser" ,
22- "test:node" : " mocha --compilers js:babel-core/ register --recursive ./test/node" ,
22+ "test:node" : " mocha --compilers js:babel-register --recursive ./test/node" ,
2323 "test:browser" : " karma start" ,
2424 "test:cov" : " npm run test:cov:browser && npm run test:cov:node && npm run test:cov:report" ,
2525 "test:cov:node" : " babel-node $(npm bin)/isparta cover $(npm bin)/_mocha report --dir ./coverage/node-coverage -- --recursive ./test/node" ,
4141 "babel-core" : " ^6.2.1" ,
4242 "babel-eslint" : " ^4.1.6" ,
4343 "babel-loader" : " ^6.2.0" ,
44+ "babel-polyfill" : " ^6.3.14" ,
4445 "babel-preset-es2015" : " ^6.3.13" ,
4546 "babel-preset-stage-1" : " ^6.3.13" ,
47+ "babel-register" : " ^6.4.3" ,
4648 "eslint" : " ^1.10.3" ,
4749 "eslint-config-rackt" : " ^1.1.1" ,
4850 "eslint-plugin-react" : " ^3.15.0" ,
Original file line number Diff line number Diff line change 1+ import 'babel-polyfill'
2+
13import { hashHistory , browserHistory } from 'react-router'
24import createTests from '../createTests.js'
35
You can’t perform that action at this time.
0 commit comments