Add Lit as an explicit dependency of video-series-samples #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
When using
npm install github:lit/video-series-samples
, the dependencies are installed from the root package.json.Why
This is needed to install the simple carousel from Github in the BWL002 video and have the
lit
dependency resolve. We need the root package.json to depend on the simple-carousel project.Tradeoffs
This duplicates the Lit dependency in the root package.json which is used to install dependencies during a npm github install. This is a strange case because we want to allownpm install
of the repo to use thesimple-carousel
easily, but we also want the simple carousel folder to be a self contained project that can also be installed.The root package.json needs enough information to install dependencies and use the builtsimple-carousel
. And the simple carousel folder also needs enough information to install itself as a self contained project (mimics the lit-starter-template structure).@rictic perfectly resolved the tradeoff by suggesting a
file
dependency. Tested and it works! Dependencies are now DRY! Thank you!Testing
Tested manually by using
npm link
andnpm link video-series-samples
. Then locally using this in create-react-app which is done in the video.Commands used in video: