import * as Cms from './app/cms'; const fs = require("fs"); const Promise = require("bluebird"); const readFile = Promise.promisify(fs.readFile); // readFile('./test/data/schema.json', 'utf-8') // .then(str => { // console.log(JSON.stringify(Cms.schemaToModel(JSON.parse(str)), null, 2)); // }); readFile('./test/data/model.json', 'utf-8') .then(str => { console.log(JSON.stringify(Cms.modelToSchema(JSON.parse(str)), null, 2)); });