-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added node project to pull dfe and gov styles into mvc app (#6)
* added node project to pull dfe and gov styles into mvc app * Added classes to style the content page * Removed the content action to make it the index * Added favicon link * Updated the title --------- Co-authored-by: Daniel Clarke <[email protected]> Co-authored-by: Sam Carter <[email protected]>
- Loading branch information
1 parent
472a2c9
commit 70e0db4
Showing
41 changed files
with
16,286 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import * as esbuild from 'esbuild'; | ||
import { sassPlugin } from 'esbuild-sass-plugin'; | ||
import { cpSync, readdirSync } from 'fs'; | ||
|
||
//Builds SASS | ||
await esbuild.build({ | ||
entryPoints: ['styles/application.scss'], | ||
bundle: true, | ||
minify: true, | ||
sourcemap: true, | ||
target: ['chrome58', 'firefox57', 'safari11', 'edge16'], | ||
external: ['/assets/*'], | ||
plugins: [sassPlugin({ | ||
loader: { ".woff2": "file", ".png": "file" }, | ||
})], | ||
outfile: 'out/css/application.css' | ||
}); | ||
|
||
//Copy assets | ||
//DFE | ||
const dfeDir = "./node_modules/dfe-frontend-alpha/packages/assets"; | ||
readdirSync(dfeDir).forEach(file => { | ||
if (file.indexOf(".png") == -1) { | ||
return; | ||
} | ||
|
||
cpSync(dfeDir + "/" + file, "./out/assets/images/" + file, { overwrite: true }); | ||
}); | ||
|
||
//GOVUK | ||
const govukDir = "./node_modules/govuk-frontend/dist/govuk/assets/"; | ||
const targetFolders = ["images", "fonts"]; | ||
const ignoreFiles = ["favicon.ico"]; | ||
|
||
for (const folder of targetFolders) { | ||
const path = govukDir + folder; | ||
|
||
readdirSync(path).forEach(file => { | ||
if (ignoreFiles.some(ignoreFile => ignoreFile == file)) { | ||
return; | ||
} | ||
|
||
cpSync(`${path}/${file}`, `./out/assets/${folder}/${file}`, { overwrite: true }); | ||
}) | ||
} | ||
|
||
//Copy to web project | ||
const targetDir = "../Dfe.EarlyYearsQualification.Web/wwwroot"; | ||
const folders = ["css", "assets"]; | ||
|
||
for (const folder of folders) { | ||
const path = `./out/${folder}`; | ||
|
||
cpSync(path, `${targetDir}/${folder}`, { recursive: true, overwrite: true }); | ||
} |
Binary file added
BIN
+39.9 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/fonts/bold-affa96571d-v2.woff
Binary file not shown.
Binary file added
BIN
+30.7 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/fonts/bold-b542beb274-v2.woff2
Binary file not shown.
Binary file added
BIN
+32.6 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/fonts/light-94a07e06a1-v2.woff2
Binary file not shown.
Binary file added
BIN
+42.4 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/fonts/light-f591b13f7d-v2.woff
Binary file not shown.
Binary file added
BIN
+191 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/images/dfe-logo-alt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
src/Dfe.EarlyYearsQualification.Node/out/assets/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.68 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/images/govuk-crest-2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.5 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/images/govuk-crest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.81 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/images/govuk-icon-180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.68 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/images/govuk-icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.67 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/images/govuk-icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
src/Dfe.EarlyYearsQualification.Node/out/assets/images/govuk-icon-mask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15 KB
src/Dfe.EarlyYearsQualification.Node/out/assets/images/govuk-opengraph-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
src/Dfe.EarlyYearsQualification.Node/out/css/application.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.