Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install missing dependencies (with --preact or --inferno flag) + Yarn support #214

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Update dependencies
  • Loading branch information
insin committed Dec 13, 2016
commit 2177812c08c11d745f674607a514778bf581d522
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

* The default build for a React component demo app now supports use of a `demo/public/` directory for static content.

**Dependencies:**

- phantomjs-prebuilt: v2.1.14 → [v2.1.14](https://github.com/Medium/phantomjs/releases/tag/2.1.14)
- webpack-merge: v1.0.2 → [v1.1.0](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#110--2016-12-09)

# 0.13.6 / 2016-12-13

**Fixed:**
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"resolve": "1.1.7",
"rimraf": "2.5.4",
"temp": "0.8.3",
"webpack-merge": "1.0.2",
"webpack-merge": "1.1.0",
"whatwg-fetch": "2.0.1",

"babel-cli": "6.18.0",
Expand Down Expand Up @@ -91,7 +91,7 @@
"karma-phantomjs-launcher": "1.0.2",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "1.8.0",
"phantomjs-prebuilt": "2.1.13",
"phantomjs-prebuilt": "2.1.14",

"mocha": "3.2.0",
"expect": "1.20.2",
Expand Down
4 changes: 3 additions & 1 deletion src/createWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,9 @@ export function getCompatConfig(userCompatConfig = {}) {
}
configs.push(compatConfig)
})
return configs.length > 0 ? merge(...configs) : null
if (configs.length === 0) return null
if (configs.length === 1) return {...configs[0]}
return merge(...configs)
}

/**
Expand Down
4 changes: 4 additions & 0 deletions tests/createWebpackConfig-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,8 @@ describe('getCompatConfig()', () => {
it('supports sinon', () => {
expect(getCompatConfig({sinon: true})).toEqual(COMPAT_CONFIGS.sinon)
})
it('merges multiple compat configs ', () => {
expect(getCompatConfig({enzyme: true, sinon: true}))
.toEqual({...COMPAT_CONFIGS.enzyme, ...COMPAT_CONFIGS.sinon})
})
})