@@ -27,6 +27,16 @@ module.exports = function(projectRoot) {
2727 fs . existsSync ( configPath ) ) ;
2828
2929 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 ;
3040
3141 assert ( 'config/flexi.js is defined, but could not be imported' , flexiConfig ) ;
3242 assert ( 'config/flexi.js is defined, but does not contain property [array] breakpoints,'
@@ -35,6 +45,14 @@ module.exports = function(projectRoot) {
3545 assert ( 'config/flexi.js is defined, but does not contain property [number] columns,'
3646 + ` consider running ${ GENERATE_CONFIG_COMMAND } to see the default config file.` ,
3747 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 ) ;
3855
3956 return flexiConfig ;
4057} ;
58+
0 commit comments