File tree 6 files changed +15
-8
lines changed
6 files changed +15
-8
lines changed Original file line number Diff line number Diff line change
1
+ export { version } from './version.mjs'
Original file line number Diff line number Diff line change
1
+ import pkg from '../../packages/nhsuk-frontend/package.json' with { type : 'json' }
2
+
3
+ /**
4
+ * NHS.UK frontend release version
5
+ */
6
+ export const version = pkg . version
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import nunjucks from 'nunjucks'
9
9
import PluginError from 'plugin-error'
10
10
11
11
import validatorConfig from '../../.htmlvalidate.js'
12
- import pkg from '../../package.json' with { type : 'json' }
12
+ import * as config from '../config/index.mjs'
13
13
14
14
const { PORT = 3000 } = process . env
15
15
@@ -33,7 +33,7 @@ export async function buildHTML() {
33
33
34
34
const html = env . render ( path , {
35
35
baseUrl : '/nhsuk-frontend/' ,
36
- version : pkg . version
36
+ version : config . version
37
37
} )
38
38
39
39
const destPath = join ( 'dist/app' , dir )
Original file line number Diff line number Diff line change 1
1
import gulp from 'gulp'
2
2
3
- import pkg from '../../package.json' with { type : 'json' }
3
+ import * as config from '../config/index.mjs'
4
4
5
5
/**
6
6
* Assets tasks
@@ -44,6 +44,6 @@ export async function createZip() {
44
44
encoding : false
45
45
}
46
46
)
47
- . pipe ( zip ( `nhsuk-frontend-${ pkg . version } .zip` ) )
47
+ . pipe ( zip ( `nhsuk-frontend-${ config . version } .zip` ) )
48
48
. pipe ( gulp . dest ( 'dist' ) )
49
49
}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import terser from 'gulp-terser'
7
7
import PluginError from 'plugin-error'
8
8
import webpack from 'webpack-stream'
9
9
10
- import pkg from '../../package.json' with { type : 'json' }
10
+ import * as config from '../config/index.mjs'
11
11
12
12
/**
13
13
* Compile JavaScript task
@@ -90,7 +90,7 @@ export function minifyJS() {
90
90
)
91
91
. pipe (
92
92
rename ( {
93
- suffix : `-${ pkg . version } .min`
93
+ suffix : `-${ config . version } .min`
94
94
} )
95
95
)
96
96
. pipe (
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import gulpSass from 'gulp-sass'
11
11
import PluginError from 'plugin-error'
12
12
import dartSass from 'sass-embedded'
13
13
14
- import pkg from '../../package.json' with { type : 'json' }
14
+ import * as config from '../config/index.mjs'
15
15
16
16
const sass = gulpSass ( dartSass )
17
17
@@ -74,7 +74,7 @@ export function minifyCSS() {
74
74
. pipe ( postcss ( [ cssnano ( ) ] ) )
75
75
. pipe (
76
76
rename ( {
77
- suffix : `-${ pkg . version } .min`
77
+ suffix : `-${ config . version } .min`
78
78
} )
79
79
)
80
80
. pipe (
You can’t perform that action at this time.
0 commit comments