-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Yarn workspaces #1810
Yarn workspaces #1810
Changes from 1 commit
4d10a55
adb20c6
dc0bd90
2486947
b4d9ee0
d22f209
cd7472a
51363c2
78a42a8
2308e98
fee27b5
6d37521
d846b0c
5d8e07e
75b0076
181878d
cc9ab25
5382fcb
8df6f4d
fe9ee4e
38011e8
f343861
f3046d5
824bbd6
11298bf
088c5f8
bd31e8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,45 +10,36 @@ dependencies: | |
pre: | ||
- yarn global add npm | ||
jobs: | ||
validate: | ||
<<: *defaults | ||
steps: | ||
- run: | ||
name: "Checking Versions" | ||
command: | | ||
node --version | ||
npm --version | ||
yarn --version | ||
build: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-dependencies-{{ checksum "package.json" }} | ||
- root-dependencies-{{ checksum "yarn.lock" }} | ||
- root-dependencies- | ||
- run: | ||
name: "Install yarn 1.0.0-prerelease" | ||
command: | | ||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --nightly | ||
curl -o- -L https://yarnpkg.com/install.sh | bash -s | ||
- run: | ||
name: "Install root dependencies" | ||
command: | | ||
yarn install | ||
- save_cache: | ||
key: root-dependencies-{{ checksum "package.json" }} | ||
key: root-dependencies-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
- restore_cache: | ||
keys: | ||
- package-dependencies-{{ checksum "package.json" }} | ||
- package-dependencies-{{ checksum "yarn.lock" }} | ||
- package-dependencies- | ||
- run: | ||
name: "Bootstrapping" | ||
command: | | ||
yarn bootstrap --all | ||
yarn bootstrap --core --docs --reactnative --reactnativeapp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was wrong with |
||
- save_cache: | ||
key: package-dependencies-{{ checksum "package.json" }} | ||
key: package-dependencies-{{ checksum "yarn.lock" }} | ||
paths: | ||
- app/**/node_modules | ||
- docs/**/node_modules | ||
|
@@ -60,7 +51,7 @@ jobs: | |
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-dependencies-{{ checksum "package.json" }} | ||
- root-dependencies-{{ checksum "yarn.lock" }} | ||
- root-dependencies- | ||
- run: | ||
name: "Install yarn 1.0.0-prerelease" | ||
|
@@ -88,7 +79,7 @@ jobs: | |
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-dependencies-{{ checksum "package.json" }} | ||
- root-dependencies-{{ checksum "yarn.lock" }} | ||
- root-dependencies- | ||
- run: | ||
name: "Install yarn 1.0.0-prerelease" | ||
|
@@ -114,7 +105,7 @@ jobs: | |
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-dependencies-{{ checksum "package.json" }} | ||
- root-dependencies-{{ checksum "yarn.lock" }} | ||
- root-dependencies- | ||
- run: | ||
name: "Install yarn 1.0.0-prerelease" | ||
|
@@ -134,7 +125,7 @@ jobs: | |
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-dependencies-{{ checksum "package.json" }} | ||
- root-dependencies-{{ checksum "yarn.lock" }} | ||
- root-dependencies- | ||
- run: | ||
name: "Install yarn 1.0.0-prerelease" | ||
|
@@ -154,7 +145,7 @@ jobs: | |
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-dependencies-{{ checksum "package.json" }} | ||
- root-dependencies-{{ checksum "yarn.lock" }} | ||
- root-dependencies- | ||
- run: | ||
name: "Install yarn 1.0.0-prerelease" | ||
|
@@ -180,7 +171,6 @@ workflows: | |
version: 2 | ||
build_accept_deploy: | ||
jobs: | ||
- validate | ||
- build | ||
- example-kitchen-sinks | ||
- example-react-native | ||
|
@@ -192,4 +182,4 @@ workflows: | |
# requires: | ||
# - lint | ||
# - unit-test | ||
# - docs | ||
# - docs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,17 @@ log.heading = 'storybook'; | |
const prefix = 'bootstrap'; | ||
log.addLevel('aborted', 3001, { fg: 'red', bold: true }); | ||
|
||
const spawn = command => { | ||
const out = childProcess.spawnSync(`${command}`, { | ||
shell: true, | ||
stdio: 'inherit', | ||
}); | ||
const spawn = (command, options = {}) => { | ||
const out = childProcess.spawnSync( | ||
`${command}`, | ||
Object.assign( | ||
{ | ||
shell: true, | ||
stdio: 'inherit', | ||
}, | ||
options | ||
) | ||
); | ||
|
||
if (out.status !== 0) { | ||
process.exit(out.status); | ||
|
@@ -71,6 +77,9 @@ const tasks = { | |
defaultValue: true, | ||
option: '--core', | ||
command: () => { | ||
log.info(prefix, 'prepublish'); | ||
spawn('lerna run prepublish -- --silent'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this won't work without global lerna installed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and without some package deps like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't lerna a local dependency? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, yes, didn't know you can run local deps with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, you can't run bootstrap script without root dependencies anyway |
||
log.info(prefix, 'yarn workspace'); | ||
spawn('yarn bootstrap:core'); | ||
}, | ||
}), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn version won't print the correct version anymore, This script isn't providing value really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe comment it instead? To reenable once docker image gets updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh, it's really not useful the info is in the logs anyway.