Separate out docs, fidelity tests and shared assets#962
Merged
Conversation
520a075 to
e85a99d
Compare
Contributor
Author
|
I think the reason for the megadiff is that we went from 1 to 4 package-lock.json files... |
added 8 commits
January 17, 2020 08:12
c34ab6d to
0d318fd
Compare
Contributor
Author
|
Rebased on master |
elalish
pushed a commit
to elalish/model-viewer
that referenced
this pull request
Feb 4, 2020
Separate out docs, fidelity tests and shared assets (google#962) * Move docs to its own package * WIP Move docs and fidelity tests to sub-packages * Update READMEs and cherry-pick travis fix * Fix puppeteer version, simplify travis.yaml, fix renderer viewers * Clean up fidelity testing code * Deploy fidelity results w/ docs * Global clean command * Add basic web server * Document support node versions * Fix spot1Lux.hdr file location * Fix blank screenshot renders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change splits out the source tree into four distinct packages:
<model-viewer>web componentAs part of this change, we are moving to lerna.js in order to manage our repo as a collection of distinct packages. The new top-level README contains instructions for getting set up with this new arrangement:
git clone git@github.com:GoogleWebComponents/model-viewer.git cd model-viewer npm install npm run bootstrapThese
npmcommands wraplernacalls, so hopefully direct interaction withlernawill not be needed for typical dev work.lernagives us the ability to fan-out calls tonpm run *commands, so from the root of the project you can invoke commands likenpm run buildandnpm run testto run the corresponding commands in all sub-packages that implement them.Most of the
npm run *commands still work as they used to when run from thepackages/model-viewerfolder. In addition, there is a newnpm run servecommand that you can use from the root of the project to get a project-wide server.Important note about
npm installTL;DR prefer
npm run bootstrapat the project root overnpm installin individual sub-projects.In order to "cross-link" packages with each other during local dev,
lernacreates symlink within thenode_modulesfolder of each package wherever there happens to be a dependency on another local package. This means that when you make a change in one package, you don't need to do anything to keep other packages up to date. However, it also means that if you runnpm install(and a few othernpmcommands) directly inside of a given sub-package (as opposed to the root of the project),npmwill delete the symlinks and try to replace them with real packages downloaded from the NPM registry. This is typically just annoying, but in the case of at least one of our packages it will outright fail because it is a "private" package and never published to the NPM registry.The solution to this problem is to always prefer
npm run bootstrapat the root of the project repository in order to install dependencies from NPM, and letlernado its thing.Notable differences
In no particular order:
npm run check-fidelityis nownpm run testfor therendering-fidelity-toolsprojectREADME.mdhas been cleaned up and moved to themodel-viewerproject; all other READMEs include links to that one