Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
fix: Addresses storybook dependency and pod install issues (#238 by @…
Browse files Browse the repository at this point in the history
…bryanstearns)

* Work around storybook dependency problem
* Check `yarn compile` in the generated-app test too
* Make our post-install Windows-safe; add Darwin check for cocoapods binary
  • Loading branch information
bryanstearns authored and jamonholmgren committed Aug 14, 2019
1 parent 19036df commit d88d60e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion boilerplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ async function install(context) {

ignite.patchInFile(`${process.cwd()}/package.json`, {
replace: `"postinstall": "solidarity",`,
insert: `"postinstall": "solidarity && jetify && (cd ios; pod install)",`,
insert: `"postinstall": "solidarity && jetify && if which pod >/dev/null; then (cd ios; pod install); fi",`,
})
} catch (e) {
ignite.log(e)
Expand Down
9 changes: 9 additions & 0 deletions boilerplate/.solidarity
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
"semver": ">=9.2.0",
"platform": "darwin"
}
],
"CocoaPods": [
{
"rule": "cli",
"binary": "pod",
"version": "--version",
"semver": ">=1.7.0",
"platform": "darwin"
}
]
}
}
7 changes: 7 additions & 0 deletions boilerplate/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"@storybook/addon-storyshots": "^5.1.9",
"@storybook/react-native": "^5.1.9",
"babel-core": "7.0.0-bridge.0",
<%# Work around https://github.com/storybookjs/storybook/issues/5817
which results in the "can yarn install and pass tests" test failing
with "Cannot find module 'emotion-theming' from 'index.js'".
If you upgrade packages, try removing these two: -%>
"@emotion/core": "^10.0.15",
"emotion-theming": "^10.0.14",
"@types/jest": "24.0.16",
"@types/ramda": "0.26.18",
"@types/react": "16.8.23",
Expand Down
2 changes: 1 addition & 1 deletion test/generators-integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("a generated app", () => {
.shell("yarn test 2>&1")
.then(() => execa.shell("git status --porcelain"))
.then(({ stdout }) => expect(stdout).toEqual(""))
.then(() => execa.shell("yarn format && yarn lint --max-warnings 0"))
.then(() => execa.shell("yarn compile && yarn format && yarn lint --max-warnings 0"))
.then(() => execa.shell("git status --porcelain")),
).resolves.toMatchObject({ stdout: "" }) // will fail & show the yarn or test errors
})
Expand Down

2 comments on commit d88d60e

@wistler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. I think this was supposed to fix my issue, but I still a pod-related error with 4.6.1 & 4.6.2. Please see issue #243
Any help appreciated. Thanks.

@jamonholmgren
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4.6.3, thanks @wistler

Please sign in to comment.