Test CSS Build Output - TACC/Core-CMS GitHub Wiki
- Build Core and relevant project CSS on
main(using its submodule commit). - Build Core and relevant project CSS on relevant branch to test (using its submodule commit).
- Confirm that built files have expected difference (if any is expected).
- Checkout
main:git checkout main
- Update
tacciste_custom:-
git submodule updateIf nothing happens, that is okay—it just means it is already up to date.
-
- Build CSS:
npm run build --project=name-of-project-to-test. - Confirm there is no error output.
- Copy built CSS to temporary directory for comparison:*
cp -r taccsite_cms/static/site_cms/css/build taccsite_cms/static/site_cms/css/build.testcp -r taccsite_custom/the-project/static/the-project/css/build taccsite_custom/the-project/static/the-project/css/build.test
- Add/stage the new
build.testdirectories (so you can compare them when they change):git add taccsite_cms/static/site_cms/css/build.testcd taccsite_customgit add the-project/static/the-project/css/build.testcd ../
- Checkout the branch to test.
- Update
tacciste_custom:-
git submodule update§
-
- Build CSS:
npm run build --project=name-of-project-to-test. - Confirm there is no error output.
- 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/
- Review diff of
build.test/'s files in working directory to staging/index.git diff
- Ensure only expected differences‡§ appear.
Footnotes
* 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.