Skip to content

Commit

Permalink
Merge pull request #734 from DFE-Digital/remove-v6
Browse files Browse the repository at this point in the history
Remove unnecessary v6 code from the prototype
  • Loading branch information
simonwhatley authored Jul 19, 2024
2 parents 4aaf7a5 + 61b51ac commit 13d7a3a
Show file tree
Hide file tree
Showing 10 changed files with 263 additions and 121 deletions.
126 changes: 126 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# http://EditorConfig.org
# https://gds-way.cloudapps.digital/manuals/programming-languages/editorconfig
root = true

[*.java]
indent_size = 4
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = false
continuation_indent_size = 8

[*.scss]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.erb]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.html]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.njk]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.css]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.js]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
indent_size = 4
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 119

[*.rb]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.sh]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[Makefile]
indent_size = 2
indent_style = tab
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[**vendor**]
indent_size =
indent_style =
charset =
end_of_line =
insert_final_newline =
trim_trailing_whitespace =
max_line_length =
105 changes: 105 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text eol=crlf
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.ksh text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.bz binary
*.bz2 binary
*.bzip2 binary
*.gz binary
*.lz binary
*.lzma binary
*.rar binary
*.tar binary
*.taz binary
*.tbz binary
*.tbz2 binary
*.tgz binary
*.tlz binary
*.txz binary
*.xz binary
*.Z binary
*.zip binary
*.zst binary

# Fonts
*.eot binary
*.otf binary
*.ttf binary
*.woff binary
*.woff2 binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
43 changes: 28 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Register trainee teachers (prototype)
# Register trainee teachers prototype

This prototype is based on the [GOV.UK prototype kit](https://github.com/alphagov/govuk-prototype-kit)
A service for collecting and managing trainee teacher registration data.

This prototype is based on the:

- [GOV.UK Design System](https://design-system.service.gov.uk/)
- [GOV.UK Prototype Kit](https://prototype-kit.service.gov.uk/docs/)

## Installation

### Requirements

- node.js - version 16.x.x or later
- node.js - version 20.x.x or later

### Install dependencies

Expand All @@ -16,7 +21,7 @@ This prototype is based on the [GOV.UK prototype kit](https://github.com/alphago

`npm start`

Go to [http://localhost:3000]() in your browser.
Go to <http://localhost:3000> in your browser.

## Deployed prototype

Expand All @@ -26,7 +31,7 @@ This version deploys automatically from merges to master and is the 'latest' ver

## Design history

URL: https://bat-design-history.netlify.app/register-trainee-teachers/
URL: <https://bat-design-history.netlify.app/register-trainee-teachers/>

A history of the design of this service

Expand Down Expand Up @@ -66,20 +71,28 @@ Most training route and funding data is kept in `app/data/training-route-data.js

This file controls:

* The types of training route available
* What data / task list section each route should have
* Funding available for each route

- The types of training route available
- What data / task list section each route should have
- Funding available for each route

## Changes needed each academic year

Things that need to be updated in the new academic year:

* Update course generator to generate courses for next year (a year ahead of current), removing the oldest year
* Update `app/data/years.js` to update the current academic year, removing the oldest year
* Update `app/data/training-route-data.js` to update the funding available for each route
* Regenerate courses
* Regenerate trainees
* Regenerate trainee problems
- Update course generator to generate courses for next year (a year ahead of current), removing the oldest year
- Update `app/data/years.js` to update the current academic year, removing the oldest year
- Update `app/data/training-route-data.js` to update the funding available for each route
- Regenerate courses
- Regenerate trainees
- Regenerate trainee problems

## Tools

If you’re using [Visual Studio (VS) Code](https://code.visualstudio.com/) for prototyping, we recommend you install the following extensions:

- [GOV.UK Design System snippets](https://marketplace.visualstudio.com/items?itemName=simonwhatley.govuk-design-system-snippets)
- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
- [Nunjucks for VS Code](https://marketplace.visualstudio.com/items?itemName=ronnidc.nunjucks)
- [Nunjucks snippets](https://marketplace.visualstudio.com/items?itemName=luwenjiechn.nunjucks-vscode-snippets)

We also recommend you update your VS Code settings to make sure you’re trimming whitespace: `Files: Trim Trailing Whitespace`.
1 change: 0 additions & 1 deletion gulp/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"paths": {
"public": "public/",
"assets" : "app/assets/",
"v6Assets": "app/v6/assets/",
"nodeModules": "node_modules/",
"lib": "lib/"
}
Expand Down
6 changes: 0 additions & 6 deletions gulp/copy-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ gulp.task('copy-assets', function () {
config.paths.assets + '/**'])
.pipe(gulp.dest(config.paths.public))
})

gulp.task('copy-assets-v6', function () {
return gulp.src(['!' + config.paths.v6Assets + 'sass{,/**/*}',
config.paths.v6Assets + '/**'])
.pipe(gulp.dest(config.paths.public + '/v6'))
})
17 changes: 0 additions & 17 deletions gulp/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,3 @@ gulp.task('sass', function () {
.pipe(sourcemaps.write())
.pipe(gulp.dest(config.paths.public + '/stylesheets/'))
})

// Backward compatibility with Elements

gulp.task('sass-v6', function () {
return gulp.src(config.paths.v6Assets + '/sass/*.scss')
.pipe(sourcemaps.init())
.pipe(sass({
outputStyle: 'expanded',
includePaths: [
'node_modules/govuk_frontend_toolkit/stylesheets',
'node_modules/govuk-elements-sass/public/sass',
'node_modules/govuk_template_jinja/assets/stylesheets'
]
}).on('error', sass.logError))
.pipe(sourcemaps.write())
.pipe(gulp.dest(config.paths.public + '/v6/stylesheets/'))
})
11 changes: 0 additions & 11 deletions gulp/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,3 @@ gulp.task('watch-assets', function () {
return gulp.watch([config.paths.assets + 'images/**',
config.paths.assets + 'javascripts/**'], { cwd: './' }, gulp.task('copy-assets'))
})

// Backward compatibility with Elements

gulp.task('watch-sass-v6', function () {
return gulp.watch(config.paths.v6Assets + 'sass/**', { cwd: './' }, gulp.task('sass-v6'))
})

gulp.task('watch-assets-v6', function () {
return gulp.watch([config.paths.v6Assets + 'images/**',
config.paths.v6Assets + 'javascripts/**'], { cwd: './' }, gulp.task('copy-assets-v6'))
})
8 changes: 2 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ gulp.task('generate-assets', gulp.series(
'school-search-index',
gulp.parallel(
'sass',
'copy-assets',
'sass-v6',
'copy-assets-v6'
'copy-assets'
)
))
gulp.task('watch', gulp.parallel(
'watch-sass',
'watch-assets',
'watch-sass-v6',
'watch-assets-v6'
'watch-assets'
))
gulp.task('default', gulp.series(
'generate-assets',
Expand Down
Loading

0 comments on commit 13d7a3a

Please sign in to comment.