fix: tup-274 core-styles dependencies to root #51
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.
Overview
Move core-styles dependencies to root
package.json
.But also tetain its dependencies as
peerDependencies
so any client repo can resolve the dependencies in a way that is compatible with tup-ui monorepo.Simplify core-styles
project.json
.I reduce complexity that seems unnecessary for core-styles.
Related
Changes
project.json
* By not using
dependencies
, internal to core-styles, a set of dependencies is not exactly duplicated from root. Instead, core-styles lists dependencies that it expects are installed (whether by TACC/tup-ui or TACC/Core-CMS† or TACC/Core-Portal). This works becausepeerDependencies
are automatically installed, if not already installed (as of NPM v7).† TACC/Core-CMS is not using TACC/tup-ui's core-styles, but it is supposed to in the future, so this change makes its build process remain compatible with TACC/Core-CMS. I am mirroring and testing this via TACC/Core-Styles#46 and TACC/Core-CMS#552.
Testing
in TACC/tup-ui
/dist
,/libs/core-styles/node_modules
,/libs/core-styles/dist
.npm ci
.nx run core-styles:build --skip-nx-cache
.nx run tup-ui:build --skip-nx-cache
.✅ in TACC/Core-CMS (i.e. TACC/Core-CMS#552)
Already peer-tested via TACC/Core-CMS#552 for TACC/Core-Styles#46 (review).
task/tup-274-core-styles-deps
.npm run build --project=core-cms
npm run build --project=frontera-cms
Footnotes
A CMS stylesheet build error caused by a missing dependency will halt the build. ↩
An error caused by a missing stylesheet will not halt the build (known problem). Search for
Error: Failed to find
. ↩