import themeX = require ( './themeX' ) ; import fs = require ( 'fs' ) ; import path = require ( 'path' ) ; import jsen = require ( 'jsen' ) ; export = ( bundle ) : boolean => { return checkProject ( bundle . project ) ; } ; /** Checks to see if a given  */ function checkProject ( project ) { const scheme = loadScheme ( '../schemes/themeX.project.schema.json' ) ; const validate = jsen ( scheme ) ; return validate ( project ) ; } function loadScheme ( scheme ) { try { const file = fs . readFileSync ( path . join ( __dirname , scheme ) , 'utf8' ) ; return JSON . parse ( file ) ; } catch ( err ) { return null ; } }