Kill npm and other build clean up #616

Closed
opened 2017-09-25 17:14:37 +02:00 by kauffj · 1 comment
kauffj commented 2017-09-25 17:14:37 +02:00 (Migrated from github.com)

2 package managers is pretty dumb.

In addition, our set up steps require manual installation of modules that ought to be installable via configuration files.

There was a time when the setup process was:

  • Install package manager
  • Checkout project
  • Run ./build.sh

We ought to get back to this standard.

2 package managers is pretty dumb. In addition, our set up steps require manual installation of modules that ought to be installable via configuration files. There was a time when the setup process was: - Install package manager - Checkout project - Run `./build.sh` We ought to get back to this standard.
lyoshenka commented 2017-09-25 17:30:00 +02:00 (Migrated from github.com)

npm is only used for npm rebuild (1, 2) and for installing yarn on windows. If we can replace both and the build script still works, we will have killed npm.

Yarn does not support rebuild yet. See https://github.com/yarnpkg/yarn/issues/756

rebuild is used in combination with electron-rebuild to make sure we've built the modules (primarily node-sass and keytar, but it could be others in the future) against the correct version of node (the one that gets packaged by electron). I'm not 100% sure we're doing it right. I kinda found this setup through trial and error. If someone understands how all the rebuild commands interact, it may be possible to avoid npm rebuild.

npm is only used for `npm rebuild` ([1](https://github.com/lbryio/lbry-app/blob/dafe9bb87d6dc3f2438aca22f8a47643dee8fc4f/build/build.sh#L69), [2](https://github.com/lbryio/lbry-app/blob/ce0dd5ae62e5daab09523aa49831ca707d521c34/build/build.ps1#L24)) and for [installing yarn on windows](https://github.com/lbryio/lbry-app/blob/ce0dd5ae62e5daab09523aa49831ca707d521c34/build/build.ps1#L7). If we can replace both and the build script still works, we will have killed npm. Yarn does not support `rebuild` yet. See https://github.com/yarnpkg/yarn/issues/756 `rebuild` is used in combination with `electron-rebuild` to make sure we've built the modules (primarily node-sass and keytar, but it could be others in the future) against the correct version of node (the one that gets packaged by electron). I'm not 100% sure we're doing it right. I kinda found this setup through trial and error. If someone understands how all the rebuild commands interact, it may be possible to avoid `npm rebuild`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#616
No description provided.