import fs from "fs" ; interface ExportSettings { destination : string ; pattern : string ; } export class Project { name : string = null ; path : string = null ; data : object = null ; getExportSettings ( ) { } } export class ProjectManager { static load ( path ) { const project = new Project ( ) ; project . path = path ; const fileName = path . replace ( /^.*[\\/]/ , "" ) ; project . name = fileName . substr ( 0 , fileName . lastIndexOf ( "." ) ) || fileName ; project . data = JSON . parse ( fs . readFileSync ( path ) . toString ( ) ) ; return project ; } static save ( path , project ) { fs . writeFileSync ( path , JSON . stringify ( project . data ) ) ; } }