@@ -27,6 +27,16 @@ module.exports = function(projectRoot) {
27
27
fs . existsSync ( configPath ) ) ;
28
28
29
29
let flexiConfig = require ( configPath ) ;
30
+ let actualVersion = flexiConfig . configVersion ;
31
+ let expectedVersion = require ( path . join ( projectRoot ,
32
+ 'node_modules' ,
33
+ '@html-next' ,
34
+ 'flexi-config' ,
35
+ 'blueprints' ,
36
+ 'flexi-config' ,
37
+ 'files' ,
38
+ 'config' ,
39
+ 'flexi.js' ) ) . configVersion ;
30
40
31
41
assert ( 'config/flexi.js is defined, but could not be imported' , flexiConfig ) ;
32
42
assert ( 'config/flexi.js is defined, but does not contain property [array] breakpoints,'
@@ -35,6 +45,14 @@ module.exports = function(projectRoot) {
35
45
assert ( 'config/flexi.js is defined, but does not contain property [number] columns,'
36
46
+ ` consider running ${ GENERATE_CONFIG_COMMAND } to see the default config file.` ,
37
47
typeof flexiConfig . columns === 'number' ) ;
48
+ assert ( 'config/flexi.js is defined, but does not contain property [string] configVersion,'
49
+ + ` consider running ${ GENERATE_CONFIG_COMMAND } to see the default config file.` ,
50
+ actualVersion ) ;
51
+ assert ( `config/flexi.js version does not match the latest config file. Got '${ actualVersion } ',`
52
+ + ` expected '${ expectedVersion } '. Consider running ${ GENERATE_CONFIG_COMMAND } to see`
53
+ + ' what your config file is missing, then update the version number to match.' ,
54
+ actualVersion === expectedVersion ) ;
38
55
39
56
return flexiConfig ;
40
57
} ;
58
+
0 commit comments