Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX: all components should have a dist folder which holds file to be imported by consuming site (both css and js) #923

Closed
aaronhans opened this issue Aug 4, 2022 · 3 comments
Assignees

Comments

@aaronhans
Copy link
Contributor

Request originated from Danny when integrating many design system components into new projects he discovered that the following components don't have any dist directory:

  • ds-link-icon
  • ds-site-footer
  • ds-site-header
  • ds-skip-to-content
  • ds-statewide-footer
  • ds-statewide-header

We intentionally set things up this way, only using dist for js build output and this is documented. The request to have the files a site needs to import all available in a dist directory for any component is valid though and may simplify component integration. We should consider outputting css files generated from scss into dist.

Action items:
Discuss requested change with design system team. If we have consensus we can modify the components to output to dist and update the directory docs to reflect that decision:

https://github.com/cagov/design-system/tree/main/components:

If a component includes javascript and uses a build step all built files will be written to a distribution folder:

Notes:

  • If a component uses js it should already have a dist folder
  • ds-link-icon is a special case: has js but is missing a dist folder, could be modified to have one and use more encapsulation
  • The code change required to use dist folders for html/css only components is minor but would require updates from any end user because they have to change their import paths so we should bump major versions of all components where we make this update
@xjensen
Copy link
Collaborator

xjensen commented Aug 5, 2022

I'm going to give this a try in PR #919. I think we have enough consensus in #324 to proceed. Let me know if I should hold.

@xjensen
Copy link
Collaborator

xjensen commented Aug 5, 2022

This is mostly ready in #919.

@xjensen
Copy link
Collaborator

xjensen commented Aug 8, 2022

This is now merged into the release branch and published to NPM.

Here's a list of components that received a major version bump, to accommodate moving CSS files to dist folders.

I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants