File tree Expand file tree Collapse file tree 6 files changed +31
-37
lines changed
Expand file tree Collapse file tree 6 files changed +31
-37
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1+ /**
2+ * Runs an ordered set of commands within each of the build directories.
3+ */
4+
5+ import fs from 'fs'
6+ import path from 'path'
7+ import { spawnSync } from 'child_process'
8+
9+ var exampleDirs = fs . readdirSync ( __dirname ) . filter ( ( file ) => {
10+ return fs . statSync ( path . join ( __dirname , file ) ) . isDirectory ( )
11+ } )
12+
13+ for ( const dir of exampleDirs ) {
14+ // declare opts in this scope to avoid https://github.com/joyent/node/issues/9158
15+ const opts = {
16+ cwd : path . join ( __dirname , dir ) ,
17+ stdio : 'inherit'
18+ }
19+
20+ let result = { }
21+ if ( process . platform === 'win32' ) {
22+ result = spawnSync ( 'npm.cmd' , [ 'install' ] , opts )
23+ } else {
24+ result = spawnSync ( 'npm' , [ 'install' ] , opts )
25+ }
26+ if ( result . status !== 0 ) {
27+ throw new Error ( 'Building examples exited with non-zero' )
28+ }
29+ }
File renamed without changes.
Original file line number Diff line number Diff line change 44 "private" : true ,
55 "devDependencies" : {
66 "enzyme" : " ^2.4.1" ,
7+ "react-addons-test-utils" : " ^15.3.0" ,
78 "react-scripts" : " 0.3.0-alpha"
89 },
910 "dependencies" : {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2323 "test:cov" : " cross-env BABEL_ENV=commonjs babel-node $(npm bin)/isparta cover $(npm bin)/_mocha -- --recursive" ,
2424 "test:examples" : " cross-env BABEL_ENV=commonjs babel-node examples/testAll.js" ,
2525 "check:src" : " npm run lint:src && npm run test" ,
26- "check:examples" : " npm run build:examples && npm run test:examples" ,
26+ "check:examples" : " npm run build:examples && npm run lint:examples && npm run test:examples" ,
2727 "build:commonjs" : " cross-env BABEL_ENV=commonjs babel src --out-dir lib" ,
2828 "build:es" : " cross-env BABEL_ENV=es babel src --out-dir es" ,
2929 "build:umd" : " cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/redux.js" ,
You can’t perform that action at this time.
0 commit comments