Skip to content

Test CSS Build Output

W. Bomar edited this page Oct 28, 2021 · 10 revisions

Steps

Overview

  1. Build Core and relevant project CSS on main (using its submodule commit).
  2. Build Core and relevant project CSS on relevant branch to test (using its submodule commit).
  3. Confirm that built files have expected difference (if any is expected).

Unabridged

  1. Checkout main:
    • git checkout main
  2. Update tacciste_custom:
    • git submodule update If nothing happens, that is okay—it just means it is already up to date.
  3. Set CUSTOM_ASSET_DIR=the-project in .env.
  4. Build CSS: npm run build.
  5. Confirm there is no error output.
  6. Copy built CSS to temporary directory for comparison:*
    • cp -r taccsite_cms/static/site_cms/css/build taccsite_cms/static/site_cms/css/build.test
    • cp -r taccsite_custom/the-project/static/the-project/css/build taccsite_custom/the-project/static/the-project/css/build.test
  7. Add/stage the new build.test directories (so you can compare them when they change):
    1. git add taccsite_cms/static/site_cms/css/build.test
    2. cd taccsite_custom
    3. git add the-project/static/the-project/css/build.test
    4. cd ../
  8. Checkout quick/simplify-css-processing.
    • git checkout quick/simplify-css-processing
  9. Update tacciste_custom:
    • git submodule update§
  10. Build CSS: npm run build.
  11. Confirm there is no error output.
  12. Overwrite previously copied built CSS with copy of newly built CSS:*†
    • rsync -a --delete taccsite_cms/static/site_cms/css/build/ taccsite_cms/static/site_cms/css/build.test/
    • rsync -a --delete taccsite_custom/the-project/static/the-project/css/build/ taccsite_custom/the-project/static/the-project/css/build.test/
  13. Review diff of build.test/'s files in working directory to staging/index.
    • git diff
  14. Ensure only expected differences‡§ appear.

* This is done so you can later compare the changes between built files on two branches using git diff (n.b. you copy the build directory so it can be tracked with Git because the build directory is ignored by Git).

Use rsync to avoid OSX cp issues.

‡ Refer to the PR or issue which linked you to this guide.

§ If the diff of taccsite_custom shows -dirty, that is expected—you made changes inside intentionally by creating the build.test directory.