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

move commands to yarn #1

Merged
merged 2 commits into from
Jun 7, 2019
Merged

move commands to yarn #1

merged 2 commits into from
Jun 7, 2019

Conversation

xavdid
Copy link
Contributor

@xavdid xavdid commented Jun 7, 2019

Swap commands to use yarn instead of npm.

the only substantive change here is that instances of npm run x have swapped to yarn x. There's also one command that's been renamed since it conflicts with the already existing yarn add.

# End of https://www.gitignore.io/api/node

packages/examples/*/yarn.lock
packages/examples/*/package-lock.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we didn't have lockfiles in the old example apps, so I figured we shouldn't here either

Copy link
Contributor

Choose a reason for hiding this comment

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

That would mean the entire monorepo wouldn't have a lockfile? That makes me a little nervous. Does this .gitignore get applied to all example apps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, the monorepo itself will still have a lockfile checked in! this only affects stuff down in the examples directory, where we don't want to push users either way.

"add": "git add exported-schema.json README.md docs",
"precommit": "npm run build && npm run add && lint-staged"
"build": "yarn docs && yarn export",
"git-add": "git add exported-schema.json README.md docs",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the only command that actually changed names

@xavdid xavdid requested a review from eliangcs June 7, 2019 02:56
Copy link
Contributor

@stevelikesmusic stevelikesmusic left a comment

Choose a reason for hiding this comment

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

So excited to see the monorepo happening @xavdid! I'm not entirely positive about the effects of leaving out the lockfile from the root. Maybe @ngryman would have a better answer. I think that lockfile is something we'd want to checkin.

Other than that, just a couple spots that still had npm.

# End of https://www.gitignore.io/api/node

packages/examples/*/yarn.lock
packages/examples/*/package-lock.json
Copy link
Contributor

Choose a reason for hiding this comment

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

That would mean the entire monorepo wouldn't have a lockfile? That makes me a little nervous. Does this .gitignore get applied to all example apps?

"scripts": {
"preversion": "git pull && npm test",
"version": "node bin/bump-dependencies.js && npm install && git add package.json package-lock.json",
"version":
"node bin/bump-dependencies.js && npm install && git add package.json package-lock.json",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to use yarn in this script?

"/lib/**/*.js",
"/schema.js"
],
"files": ["/exported-schema.json", "/lib/**/*.js", "/schema.js"],
"scripts": {
"preversion": "git pull && npm test",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use yarn test?

@xavdid xavdid merged commit 43ec10c into master Jun 7, 2019
@xavdid xavdid deleted the swap-to-yarn branch June 7, 2019 16:22
@ngryman
Copy link
Contributor

ngryman commented Jun 10, 2019

Re the multiple lock files, there should only be one at the root of the project (cf. Yarn workspaces). I'm not exactly sure how Yarn behaves with one lock file per workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants