Currently and by way of example, if a component appears in an app and that app's sub-app, such as applications/mhv and applications/mhv/secure-messaging, it gets counted twice by the component-usage script; once for each app. This ticket seeks to resolve this by improving the way component instances get counted so that they will appear only once, for the sub-app.
For example, a VaRadioOption react-binding component that shows up in applications/mhv/secure-messaging will count as an instance for that app, but will not count as an instance for the applications/mhv app.
Details
The component-usage script is comprised of two files within the component-library/packages/design-system-dashboard-cli/src directory: create-spreadsheets.js and find-ds-components.js. This ticket will require updating the counting mechanism within create-spreadsheets.js only.
Acceptance Criteria
[ ] The component-usage script counts each instance of a component only once, for the deepest-nested app within a given folder structure
Currently and by way of example, if a component appears in an app and that app's sub-app, such as
applications/mhv
andapplications/mhv/secure-messaging
, it gets counted twice by the component-usage script; once for each app. This ticket seeks to resolve this by improving the way component instances get counted so that they will appear only once, for the sub-app.For example, a VaRadioOption react-binding component that shows up in
applications/mhv/secure-messaging
will count as an instance for that app, but will not count as an instance for theapplications/mhv
app.Details
The component-usage script is comprised of two files within the
component-library/packages/design-system-dashboard-cli/src
directory:create-spreadsheets.js
andfind-ds-components.js
. This ticket will require updating the counting mechanism withincreate-spreadsheets.js
only.Acceptance Criteria