You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cacheName:'session', // must match a session you've instantiated in your hapi server config
102
+
/**
103
+
* Options that DXT uses to render Nunjucks templates
104
+
*/
105
+
nunjucks: {
106
+
basePageLayout:'your-base-layout.html', // the base page layout. Usually based off https://design-system.service.gov.uk/styles/page-template/
107
+
viewPaths // list of directories DXT should use to render your views. Must contain basePageLayout.
108
+
},
109
+
/**
110
+
* Services is what DXT uses to interact with external APIs
111
+
*/
112
+
services: {
113
+
formsService, // where your forms should be downloaded from.
114
+
formSubmissionService, // handles temporary storage of file uploads
115
+
outputService // where your form should be submitted to
116
+
},
117
+
/**
118
+
* View context attributes made available to your pages. Returns an object containing an arbitrary set of key-value pairs.
119
+
*/
120
+
viewContext: (request) => {
121
+
"example":"hello world"// available to render on a nunjucks page as {{ example }}
122
+
}
123
+
}
98
124
})
99
125
100
126
awaitserver.start()
101
127
```
102
128
103
129
## Step 3: Handling static assets
104
130
131
+
TODO: CSS will be updated with a proper build process using SASS.
132
+
105
133
1.[Update webpack to bundle the DXT application assets (CSS, JavaScript, etc)](https://github.com/DEFRA/forms-engine-plugin-example-ui/pull/1/files#diff-1fb26bc12ac780c7ad7325730ed09fc4c2c3d757c276c3dacc44bfe20faf166f)
106
134
2.[Serve the newly bundled assets from your web server](https://github.com/DEFRA/forms-engine-plugin-example-ui/pull/1/files#diff-e5b183306056f90c7f606b526dbc0d0b7e17bccd703945703a0811b6e6bb3503)
0 commit comments