Closed shekharkhedekar closed 1 year ago
Okay, I merged this and ran the command git config core.hooksPath .github/hooks
on my local, dev, stage, and production (just so I don't forget to do it there later). Then when I pulled main to my local environment, the SASS compiled 🎉.
However, I noticed that the SASS compiling automation output in Terminal showed:
up to date, audited 1 package in 176ms
found 0 vulnerabilities
vanguard-history@1.0.0 sass sass . --style=compressed --no-source-map
The --no-source-map
option means that the browser inspector shows all styles as coming from style.css rather than the SCSS files from which they originate. See documentation. I think we want source maps. Let me see if I can configure this correctly to include source maps.
Resolved with https://github.com/mrengy/vanguard-history/commit/8b9484a1cca71cec867582f0bd30b91f73183d9a , I think ;)
I had to install NVM and Node 16.19.0 (Node 19 was throwing an error) on the server. It was a bit involved but seems to work now.
Suggested alternative to the build_sass workflow.
Basically, we add
style.css
to.gitignore
, and then whenever we pull, we rebuild the css. I'm assuming that:sass . --watch
command running to make sure their local CSS are built (and not committed)git pull
on the deploy machine and the hook will run then to build the css. We can try it out on staging, I suppose