Skip to content

Commit

Permalink
Merge pull request #528 from DEFRA/a-few-tweaks-part-III
Browse files Browse the repository at this point in the history
A few tweaks part iii
  • Loading branch information
feedmypixel authored Aug 29, 2024
2 parents 3a04a03 + 74a18ef commit e2f108d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
18 changes: 12 additions & 6 deletions src/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ const config = convict({
default: eightHours,
env: 'SESSION_COOKIE_TTL'
},
nunjucks: {
watch: {
doc: 'Reload templates when they are changed.',
format: Boolean,
default: isDevelopment
},
noCache: {
doc: 'Use a cache and recompile templates each time',
format: Boolean,
default: isDevelopment
}
},
redis: {
host: {
doc: 'Redis cache host',
Expand Down Expand Up @@ -270,12 +282,6 @@ const config = convict({
'SQUID_USERNAME,SQUID_PASSWORD,REDIS_USERNAME,REDIS_PASSWORD,REDIS_KEY_PREFIX,CDP_HTTP_PROXY,CDP_HTTPS_PROXY,HTTP_PROXY,HTTPS_PROXY',
env: 'PLATFORM_GLOBAL_SECRET_KEYS'
},
enablePulse: {
doc: 'Enable Pulse',
format: Boolean,
default: isProduction,
env: 'ENABLE_PULSE'
},
enableSecureContext: {
doc: 'Enable Secure Context',
format: Boolean,
Expand Down
4 changes: 2 additions & 2 deletions src/config/nunjucks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const nunjucksEnvironment = nunjucks.configure(
throwOnUndefined: false,
trimBlocks: true,
lstripBlocks: true,
watch: !(config.get('isProduction') || config.get('isTest')),
noCache: config.get('isDevelopment')
watch: config.get('nunjucks.watch'),
noCache: config.get('nunjucks.noCache')
}
)

Expand Down
5 changes: 5 additions & 0 deletions src/server/common/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $shadow-opacity-light: 0.4;
background-color: govuk-shade(govuk-colour("blue"), 20%);
}

&:link,
&:active,
&:visited {
color: govuk-colour("white");
Expand All @@ -38,6 +39,7 @@ $shadow-opacity-light: 0.4;
background-color: govuk-shade(govuk-colour("bright-purple"), 20%);
}

&:link,
&:active,
&:visited {
color: govuk-colour("white");
Expand All @@ -53,6 +55,7 @@ $shadow-opacity-light: 0.4;
background-color: govuk-shade(govuk-colour("light-grey"), 20%);
}

&:link,
&:active,
&:visited {
color: govuk-colour("black");
Expand All @@ -68,6 +71,7 @@ $shadow-opacity-light: 0.4;
background-color: govuk-shade(govuk-colour("red"), 20%);
}

&:link,
&:active,
&:visited {
color: govuk-colour("white");
Expand All @@ -84,6 +88,7 @@ $shadow-opacity-light: 0.4;
background-color: govuk-colour("red");
}

&:link,
&:active,
&:visited {
color: govuk-colour("black");
Expand Down
6 changes: 1 addition & 5 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { addServerMethods } from '~/src/server/common/helpers/add-server-methods
import { addDecorators } from '~/src/server/common/helpers/add-decorators'

const enableSecureContext = config.get('enableSecureContext')
const enablePulse = config.get('enablePulse')

async function createServer() {
setupWreckAgents(proxyAgent())
Expand Down Expand Up @@ -86,11 +85,8 @@ async function createServer() {
await server.register(secureContext)
}

if (enablePulse) {
await server.register(pulse)
}

await server.register([
pulse,
sessionManager,
azureOidc,
sessionCookie,
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
mode: webpackConfig.isDevelopment ? 'development' : 'production',
...(webpackConfig.isDevelopment && { devtool: 'source-map' }),
watchOptions: {
aggregateTimeout: 200,
aggregateTimeout: 600,
poll: 1000
},
output: {
Expand Down

0 comments on commit e2f108d

Please sign in to comment.