-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
We discussed this in the dev catchup and the feeling is that |
1d0c0c1
to
30162a7
Compare
🐛 add call to correct script 🐍 regenerate yarn.lock following rebase
🐛 add call to correct script 🐍 regenerate yarn.lock following rebase
9094506
to
37a1edc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got a few points/questions recorded on this PR. They are as much for myself to remind me what I need to change as anything.
I've got a branch with additional changes in that I'll finish and submit a PR into this one once I've done it.
Which is a long way to say, don't bother making these changes as I'll be doing it.
- Should the assets referenced within the css be hashed too? What are the implications of the externally hosted assets e.g. the fonts using this approach?
@@ -1,5 +1,8 @@ | |||
FROM node:8.4.0-alpine | |||
|
|||
RUN apk add --no-cache python=2.7.13-r1 git-perl bash make gcc g++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are all these packages needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markysoft can you explain please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brunch relies on node-sass, which requires python.
node-sass bundles a number of pre-compiled binaries for popular distributions, but not the flavour of linux we use.
I've added lines to the Docker file to install the pre-requisites as decribed in the issue sass/node-sass#1589
The issue has been fixed in master on node-sass, but it has not been released since May
Dockerfile
Outdated
@@ -23,6 +26,6 @@ USER root | |||
RUN find /code -user 0 -print0 | xargs -0 chown "$USERNAME":"$USERNAME" | |||
USER $USERNAME | |||
|
|||
RUN [ "yarn", "run", "build-css" ] | |||
RUN yarn run brunch-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to have run
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, thought i tried it without. Okay.
sourceMaps: false, | ||
plugins: { | ||
afterBrunch: [ | ||
'sleep 1s && yarn map-replace app/views/layout.nunjucks < assets.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this come from?
brunch-config.js
Outdated
}, | ||
overrides: { | ||
development: { | ||
sourceMaps: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are source maps not used in development?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use them. But I guess "this is for everyone" So i'll put them back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't bother making any changes. See #250 (review)
brunch-config.js
Outdated
fingerprint: { | ||
srcBasePath: 'public/', | ||
destBasePath: 'public/', | ||
hashLength: 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this as 8 is the default value
package.json
Outdated
@@ -4,7 +4,7 @@ | |||
"description": "Web app to display useful information about GP practices Pharmacies", | |||
"main": "server.js", | |||
"scripts": { | |||
"build-css": "./css-build", | |||
"brunch-build": "yarn brunch build --production", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--production
isn't needed.
package.json
Outdated
@@ -18,7 +18,7 @@ | |||
"precommit": "yarn git-hook", | |||
"prepush": "yarn git-hook && yarn snyk test", | |||
"start": "node app.js", | |||
"start-watch": "nodemon app.js | ./node_modules/bunyan/bin/bunyan & nodemon -e scss -x yarn build-css -- compact", | |||
"start-watch": "yarn brunch watch & nodemon app.js | ./node_modules/bunyan/bin/bunyan", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be running as development
* Use source maps in dev * Clear old hashed files (for dev) * Remove default and otherwise unnecessary values
@st3v3nhunt wrote:
Are the images cached? They change so rarely, do we need to bother? |
PR #256 created for some tweaks to this PR. |
Feature/brunch tweaks
Superseded by #250 |
No description provided.