GSA/sam-design-system-site

[Repos]: Reconsider build processes

Closed this issue · 1 comments

Issue type

  • Repository

What happened

  1. PR #50 modified the folder structure within /src and /_site-assets to make it easier to discern which assets were from vendors.
  2. We are in the midst of creating the microsite section of the SAMWDS site.

What I expected

  1. It appears there has been a regression (or something that didn't stick), because /src/stylesheets/lib should only have two folders.
  2. The microsite area could (should ??) use the straight SAMWDS /dist assets; otherwise, we could get in a situation where the microsite uses a styleguide specific CSS class or JS function that will not be available to consumers of the SAMWDS package.

Acceptance criteria

  • Possibly - Would it be possible to fix this from happening in future by adding /src/stylesheets/lib to .gitignore?
  • Remove all folders within /src/stylesheets/lib
  • Verify various build processes only create /src/stylesheets/lib/font-awesome and /src/stylesheets/lib/uswds
  • Copy vendor assets to build uswds and font-awesome folders
  • Use only samwds.min.css and samwds.min.js for microsite area
  • Include both samwds.min.css and samwds.min.js and styleguide.css and styleguide.js
  • Commit PR with proper/desired folder structure.

The assets folder is built through Gulp and committed separately; therefore, should not negatively impact the Standards site.

Tagging #95, @eoladipo, @carlosvalle for thoughts and context.


Resulting post-build assets folder structure:

/assets
    /img (no changes necessary)
    /fonts (no changes necessary)
    /css
        samwds.min.css
        samwds.css
        samwds.css.map
        styleguide.min.css
        styleguide.css
        styleguide.css.map
        prism.css
    /js
        samwds.min.js
        samwds.js
        samwds.js.map
        styleguide.min.js
        styleguide.js
        styleguide.js.map
        prism.js

Style guide page templates should include the samwds.min.css, the styleguide.min.css, and the prism.css in the head element. Microsite page templates should include only the samwds.min.css.

Style guide page templates should include the samwds.min.js, the styleguide.min.js, and the prism.js just before the closing body tag. Microsite page templates should include only the samwds.min.js.

@carlosvalle, @diego-ruiz-rei, and @anuragmundada-reisys - Thoughts on this?